Deprecate MEMCACHED_NO_KEY_PROVIDED, and fixed key validation tests for the binary...
[awesomized/libmemcached] / libmemcached / memcached_stats.c
index 87bc3ace254455680d813f7640ee6cedf2d22ad7..d489052c6ecd5f2e551569bf5c672ab43d8172f3 100644 (file)
@@ -227,6 +227,11 @@ static memcached_return binary_stats_fetch(memcached_st *ptr,
   if (args != NULL) 
   {
     int len= strlen(args);
+
+    rc= memcached_validate_key_length(len, true);
+    unlikely (rc != MEMCACHED_SUCCESS)
+      return rc;
+
     request.message.header.request.keylen= htons((uint16_t)len);
     request.message.header.request.bodylen= htonl(len);