pandora-build 0.9
[m6w6/libmemcached] / libmemcached / memcached_key.c
index 4ea63919f0552f25d823284d820dcd713ea8e854..c992c338c7248a688197691db0024895b9d708d7 100644 (file)
@@ -1,13 +1,21 @@
 #include "common.h"
 
-memcached_return memcachd_key_test(char **keys, size_t *key_length, 
-                                   unsigned int number_of_keys)
+memcached_return memcached_key_test(const char **keys, size_t *key_length, 
+                                    unsigned int number_of_keys)
 {
-  int x;
+  uint32_t x;
+  memcached_return rc;
 
   for (x= 0; x < number_of_keys; x++)
   {
-    int y;
+    size_t y;
+
+    rc= memcached_validate_key_length(*(key_length + x), false);
+    if (rc != MEMCACHED_SUCCESS)
+      return rc;
+    
+
+
     for (y= 0; y < *(key_length + x); y++)
     {
       if ((isgraph(keys[x][y])) == 0)