gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4646 - GNUnet/src/util/loggers


From: gnunet
Subject: [GNUnet-SVN] r4646 - GNUnet/src/util/loggers
Date: Mon, 5 Mar 2007 13:44:31 -0700 (MST)

Author: durner
Date: 2007-03-05 13:44:30 -0700 (Mon, 05 Mar 2007)
New Revision: 4646

Modified:
   GNUnet/src/util/loggers/memory.c
Log:
fix crash

Modified: GNUnet/src/util/loggers/memory.c
===================================================================
--- GNUnet/src/util/loggers/memory.c    2007-03-05 19:03:17 UTC (rev 4645)
+++ GNUnet/src/util/loggers/memory.c    2007-03-05 20:44:30 UTC (rev 4646)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2006 Christian Grothoff (and other contributing authors)
+     (C) 2006, 2007 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
@@ -122,7 +122,7 @@
 const char *
 GE_memory_get(struct GE_Memory * memory,
              unsigned int index) {
-  if (index > memory->pos)
+  if (index > memory->pos || memory->messages == NULL)
     return NULL;
   return memory->messages[index].msg;
 }





reply via email to

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