Permalink
Browse files
Use strncmp when checking for large ascii multigets.
- Loading branch information...
Showing
with
3 additions
and
1 deletion.
-
+3
−1
memcached.c
|
|
@@ -3148,7 +3148,9 @@ static int try_read_command(conn *c) { |
|
|
++ptr;
|
|
|
}
|
|
|
|
|
|
- if (strcmp(ptr, "get ") && strcmp(ptr, "gets ")) {
|
|
|
+ if (ptr - c->rcurr > 100 ||
|
|
|
+ (strncmp(ptr, "get ", 4) && strncmp(ptr, "gets ", 5))) {
|
|
|
+
|
|
|
conn_set_state(c, conn_closing);
|
|
|
return 1;
|
|
|
}
|
|
|
|
0 comments on commit
d9cd01e