summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-02-04 12:26:49 -0800
committerdormando <dormando@rydia.net>2022-02-04 12:26:49 -0800
commitdde55b4b3999bde239ba718124391be2169bbcc1 (patch)
treecd39c43603356cf670f64bbea72fbc43924999a9
parent6d36807a101f8deb9af40c1ec05d33ab08c5d475 (diff)
downloadmemcached-dde55b4b3999bde239ba718124391be2169bbcc1.tar.gz
text: raise junk detection limit to 2k
this is effectively the size limit of a request... should raise to 4 or 8k but need to more carefully check how rbuf behaves. I think 4k should be safe but 8k might not due to command alignment issues.
-rw-r--r--proto_text.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proto_text.c b/proto_text.c
index 102e867..205344c 100644
--- a/proto_text.c
+++ b/proto_text.c
@@ -341,7 +341,7 @@ int try_read_command_asciiauth(conn *c) {
// If no newline after 1k, getting junk data, close out.
if (!el) {
- if (c->rbytes > 1024) {
+ if (c->rbytes > 2048) {
conn_set_state(c, conn_closing);
return 1;
}
@@ -443,9 +443,9 @@ int try_read_command_ascii(conn *c) {
el = memchr(c->rcurr, '\n', c->rbytes);
if (!el) {
- if (c->rbytes > 1024) {
+ if (c->rbytes > 2048) {
/*
- * We didn't have a '\n' in the first k. This _has_ to be a
+ * We didn't have a '\n' in the first few k. This _has_ to be a
* large multiget, if not we should just nuke the connection.
*/
char *ptr = c->rcurr;