Fix for bad null pointer on flag by Toru Maesaka.
author <brian@gir.tangent.org> <>
Mon, 21 Jan 2008 04:33:57 +0000 (20:33 -0800)
committer <brian@gir.tangent.org> <>
Mon, 21 Jan 2008 04:33:57 +0000 (20:33 -0800)
ChangeLog
lib/memcached_fetch.c

index daaccab8142f229a1c25c068a62a056108760f93..3bebceb16d33c98347d410e3b17a0581714f85d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 
+  * Fix for bad null pointer on flag by Toru Maesaka.
   * Refactor of all IO to just pass in the active server
   * Problem configuring (PKG_CHECK_MODULES) fixed by removal of "rpath" in 
     support/libmemcached.pc.in (Thanks to Ross McFarland).
index 791791149a574f8dbdb9f4a5d3a7fd836cf7c204..6c4d393afe483d6b19cf0b8e63950ca22359f643 100644 (file)
@@ -162,7 +162,9 @@ char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
         strncpy(key, result_buffer->key, result_buffer->key_length);
         *key_length= result_buffer->key_length;
       }
-      *flags= result_buffer->flags;
+
+      if (result_buffer->flags)
+        *flags= result_buffer->flags;
 
       return  memcached_string_c_copy(&result_buffer->value);
     }