asserts
authorChristian Grothoff <christian@grothoff.org>
Tue, 14 Jun 2011 11:18:06 +0000 (11:18 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 14 Jun 2011 11:18:06 +0000 (11:18 +0000)
src/fs/gnunet-service-fs_indexing.c

index dc6b829527ab1afd56bd32a0f7ad261d1b953aae..f97a0c6e694c2a88123bf073b62ce563f534172b 100644 (file)
@@ -346,6 +346,13 @@ GNUNET_FS_handle_index_start (void *cls,
       return;
     }
   ism = (const struct IndexStartMessage*) message;
+  if (0 != ism->reserved)
+    {
+      GNUNET_break (0);
+      GNUNET_SERVER_receive_done (client,
+                                 GNUNET_SYSERR);
+      return;
+    }
   fn = GNUNET_STRINGS_filename_expand ((const char*) &ism[1]);
   if (fn == NULL)
     {
@@ -472,6 +479,13 @@ GNUNET_FS_handle_unindex (void *cls,
   int found;
 
   um = (const struct UnindexMessage*) message;
+  if (0 != um->reserved)
+    {
+      GNUNET_break (0);
+      GNUNET_SERVER_receive_done (client,
+                                 GNUNET_SYSERR);
+      return;
+    }
   found = GNUNET_NO;
   prev = NULL;
   pos = indexed_files;