gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r25985 - gnunet/src/fs
Date: Sat, 2 Feb 2013 18:25:55 +0100

Author: LRN
Date: 2013-02-02 18:25:55 +0100 (Sat, 02 Feb 2013)
New Revision: 25985

Modified:
   gnunet/src/fs/gnunet-helper-fs-publish.c
Log:
Don't send more than 64k from fs helper

Modified: gnunet/src/fs/gnunet-helper-fs-publish.c
===================================================================
--- gnunet/src/fs/gnunet-helper-fs-publish.c    2013-02-01 20:23:00 UTC (rev 
25984)
+++ gnunet/src/fs/gnunet-helper-fs-publish.c    2013-02-02 17:25:55 UTC (rev 
25985)
@@ -377,7 +377,12 @@
       return GNUNET_SYSERR;    
     return GNUNET_OK;
   }
+  else if (size > (UINT16_MAX - sizeof (struct GNUNET_MessageHeader) - slen))
   {
+    /* We can't transfer more than 64k bytes in one message. */
+    size = UINT16_MAX - sizeof (struct GNUNET_MessageHeader) - slen;
+  }
+  {
     char buf[size + slen];
     char *dst = &buf[slen];
     




reply via email to

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