projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updating the exceptions header file with some slight modifications.
[m6w6/libmemcached]
/
libmemcached
/
memcached_key.c
diff --git
a/libmemcached/memcached_key.c
b/libmemcached/memcached_key.c
index ef1fe15fb47695adc0e7495de53572fab5ab5199..c8a3a0eb4f5d59d325f88614adc7ce3dad099827 100644
(file)
--- a/
libmemcached/memcached_key.c
+++ b/
libmemcached/memcached_key.c
@@
-1,14
+1,22
@@
#include "common.h"
#include "common.h"
-memcached_return memcach
d_key_test(
char **keys, size_t *key_length,
-
unsigned in
t number_of_keys)
+memcached_return memcach
ed_key_test(const
char **keys, size_t *key_length,
+
size_
t number_of_keys)
{
{
- int x;
+ uint32_t x;
+ memcached_return rc;
for (x= 0; x < number_of_keys; x++)
{
for (x= 0; x < number_of_keys; x++)
{
- int y;
- for (y= 0; y < key_length[x]; 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)
return MEMCACHED_BAD_KEY_PROVIDED;
{
if ((isgraph(keys[x][y])) == 0)
return MEMCACHED_BAD_KEY_PROVIDED;