]> andersk Git - moira.git/commitdiff
Initialize contents of buf to all nulls, rather than writing stack
authorzacheiss <zacheiss>
Wed, 11 Jul 2007 16:06:31 +0000 (16:06 +0000)
committerzacheiss <zacheiss>
Wed, 11 Jul 2007 16:06:31 +0000 (16:06 +0000)
garbage into a file.

update/get_file.c

index 87eeb959643d02de2e1516d64dbe40fe4a829dab..f92a52485692363c5c3963e68c277c7f1cd113b7 100644 (file)
@@ -70,6 +70,8 @@ int get_file(int conn, char *pathname, int file_size, int checksum,
   int found_checksum;
   char buf[BUFSIZ];
 
+  memset(buf, '\0', sizeof(buf));
+
   if (!have_authorization)
     {
       send_int(conn, MR_PERM);
This page took 0.048599 seconds and 5 git commands to generate.