gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r29265 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r29265 - gnunet/src/fs
Date: Sun, 15 Sep 2013 18:58:10 +0200

Author: grothoff
Date: 2013-09-15 18:58:09 +0200 (Sun, 15 Sep 2013)
New Revision: 29265

Modified:
   gnunet/src/fs/gnunet-helper-fs-publish.c
Log:
auto-correct missing 0-terminators in C_STRINGS/UTF-8 strings

Modified: gnunet/src/fs/gnunet-helper-fs-publish.c
===================================================================
--- gnunet/src/fs/gnunet-helper-fs-publish.c    2013-09-15 16:57:49 UTC (rev 
29264)
+++ gnunet/src/fs/gnunet-helper-fs-publish.c    2013-09-15 16:58:09 UTC (rev 
29265)
@@ -119,11 +119,11 @@
 
   if ( ((EXTRACTOR_METAFORMAT_UTF8 == format) ||
        (EXTRACTOR_METAFORMAT_C_STRING == format)) &&
-       ('\0' != data[data_size - 1]) )
+       ('\0' != data[data_len - 1]) )
   {
     char zdata[data_len + 1];
     memcpy (zdata, data, data_len);
-    zdata[data_size] = '\0';
+    zdata[data_len] = '\0';
     (void) GNUNET_CONTAINER_meta_data_insert (md, plugin_name, type, format,
                                              data_mime_type, zdata, data_len + 
1);    
   } 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]