gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1753 - in GNUnet/src/applications/fs: ecrs fsui lib


From: grothoff
Subject: [GNUnet-SVN] r1753 - in GNUnet/src/applications/fs: ecrs fsui lib
Date: Fri, 19 Aug 2005 00:12:46 -0700 (PDT)

Author: grothoff
Date: 2005-08-19 00:12:44 -0700 (Fri, 19 Aug 2005)
New Revision: 1753

Modified:
   GNUnet/src/applications/fs/ecrs/meta.c
   GNUnet/src/applications/fs/fsui/file_info.c
   GNUnet/src/applications/fs/lib/fslib.c
Log:
fix

Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c      2005-08-19 05:50:03 UTC (rev 
1752)
+++ GNUnet/src/applications/fs/ecrs/meta.c      2005-08-19 07:12:44 UTC (rev 
1753)
@@ -429,9 +429,8 @@
   if (max < sizeof(MetaDataHeader))
     return SYSERR; /* far too small */
   ic = md->itemCount;
-  size = max+1;
   hdr = NULL;
-  while (size > max) {
+  while (1) {
     size = sizeof(MetaDataHeader);
     size += sizeof(unsigned int) * ic;
     for (i=0;i<ic;i++)
@@ -474,6 +473,7 @@
     else
       ic--; /* small steps, we're close */
   }
+  GNUNET_ASSERT(size <= max);
   memcpy(target,
         hdr,
         size);

Modified: GNUnet/src/applications/fs/fsui/file_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/file_info.c 2005-08-19 05:50:03 UTC (rev 
1752)
+++ GNUnet/src/applications/fs/fsui/file_info.c 2005-08-19 07:12:44 UTC (rev 
1753)
@@ -94,7 +94,7 @@
   if (NO == FSUI_trackStatus())
     return;
   size = ECRS_sizeofMetaData(fi->meta);
-  data = MALLOC(sizeof(size));
+  data = MALLOC(size);
   GNUNET_ASSERT(size == ECRS_serializeMetaData(fi->meta,
                                               data,
                                               size,

Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c      2005-08-19 05:50:03 UTC (rev 
1752)
+++ GNUnet/src/applications/fs/lib/fslib.c      2005-08-19 07:12:44 UTC (rev 
1753)
@@ -1,5 +1,6 @@
 /*
      This file is part of GNUnet
+     (C) 2004, 2005 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published





reply via email to

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