[PATCH 11/31] refs.c: null terminate the string in copy_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ronnie Sahlberg <sahlberg@xxxxxxxxxx>
---
 refs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/refs.c b/refs.c
index 5a5f9df..58bbf1b 100644
--- a/refs.c
+++ b/refs.c
@@ -2707,6 +2707,7 @@ static int copy_msg(char *buf, const char *msg)
 	while (buf < cp && isspace(cp[-1]))
 		cp--;
 	*cp++ = '\n';
+	*cp = 0;
 	return cp - buf;
 }
 
-- 
2.0.0.rc3.506.g3739a35

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]