From 02859b1de56972ed7b7538dfd3079a4e753fce41 Mon Sep 17 00:00:00 2001 From: Date: Sun, 20 Jan 2008 20:33:57 -0800 Subject: [PATCH] Fix for bad null pointer on flag by Toru Maesaka. --- ChangeLog | 1 + lib/memcached_fetch.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index daaccab8..3bebceb1 100644 --- 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). diff --git a/lib/memcached_fetch.c b/lib/memcached_fetch.c index 79179114..6c4d393a 100644 --- a/lib/memcached_fetch.c +++ b/lib/memcached_fetch.c @@ -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); } -- 2.30.2