diff --git a/lib/ChangeLog b/lib/ChangeLog
index 613a6fc..da0fa8c 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,5 +1,14 @@
 2008-02-28 Paul Jakma <paul.jakma@sun.com>
 
+	* log.c: (mes_lookup) Sowmini Varadhan diagnosed a problem where
+	  this function can cause a NULL dereference, on lookups for unknown
+	  indices, or messages with NULL strings. Can occur, e.g., debug
+	  logging code when processing received messages. Fixed to accept a
+	  pointer to a default string to be used if there is no match.
+	* log.h: LOOKUP adjusted to match
+
+2008-02-28 Paul Jakma <paul.jakma@sun.com>
+
 	* linklist.c: This implementation expects that the data pointer not
 	  be null, e.g. listgetdata() asserts this. The list add methods
 	  don't apply the same sanity check.
diff --git a/lib/log.c b/lib/log.c
index ff47cae..ce00bfb 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -752,14 +752,24 @@
 }
 
 /* Older/faster version of message lookup function, but requires caller to pass
-   in the array size (instead of relying on a 0 key to terminate the search). */
+ * in the array size (instead of relying on a 0 key to terminate the search). 
+ *
+ * The return value is the message string if found, or the 'none' pointer
+ * provided otherwise.
+ */
 const char *
-mes_lookup (struct message *meslist, int max, int index)
+mes_lookup (struct message *meslist, int max, int index, const char *none)
 {
+  int pos = index - meslist[0].key;
+  
   /* first check for best case: index is in range and matches the key
-     value in that slot */
-  if ((index >= 0) && (index < max) && (meslist[index].key == index))
-    return meslist[index].str;
+   * value in that slot.
+   * NB: key numbering might be offset from 0. E.g. protocol constants
+   * often start at 1.
+   */
+  if ((pos >= 0) && (pos < max)
+      && (meslist[pos].key == index))
+    return meslist[pos].str;
 
   /* fall back to linear search */
   {
@@ -769,14 +779,17 @@
       {
 	if (meslist->key == index)
 	  {
+	    const char *str = (meslist->str ? meslist->str : none);
+	    
 	    zlog_debug ("message index %d [%s] found in position %d (max is %d)",
-		      index, meslist->str, i, max);
-	    return meslist->str;
+		      index, str, i, max);
+	    return str;
 	  }
       }
   }
   zlog_err("message index %d not found (max is %d)", index, max);
-  return NULL;
+  assert (none);
+  return none;
 }
 
 /* Wrapper around strerror to handle case where it returns NULL. */
diff --git a/lib/log.h b/lib/log.h
index da8fbea..7432b25 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -142,10 +142,12 @@
 extern int zlog_rotate (struct zlog *);
 
 /* For hackey massage lookup and check */
-#define LOOKUP(x, y) mes_lookup(x, x ## _max, y)
+#define LOOKUP(x, y) mes_lookup(x, x ## _max, y, "(no item found)")
 
 extern const char *lookup (struct message *, int);
-extern const char *mes_lookup (struct message *meslist, int max, int index);
+extern const char *mes_lookup (struct message *meslist, 
+                               int max, int index,
+                               const char *no_item);
 
 extern const char *zlog_priority[];
 extern const char *zlog_proto_names[];
