From: Brian Aker Date: Thu, 10 Feb 2011 23:20:54 +0000 (-0800) Subject: Check for invalid value when determinng min/max on server compatibility. X-Git-Tag: 0.51~45^2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=337d085da67b69cf3d3723329989fe2731eeee29;p=awesomized%2Flibmemcached Check for invalid value when determinng min/max on server compatibility. --- diff --git a/libmemcached/util/version.c b/libmemcached/util/version.c index bf9d0c6c..a4d5b2d4 100644 --- a/libmemcached/util/version.c +++ b/libmemcached/util/version.c @@ -29,7 +29,8 @@ static memcached_return_t check_server_version(const memcached_st *ptr __attribu /* Do Nothing */ struct local_context *check= (struct local_context *)context; - if (instance->major_version >= check->major_version && + if (instance->major_version != UINT8_MAX && + instance->major_version >= check->major_version && instance->minor_version >= check->minor_version && instance->micro_version >= check->micro_version ) {