summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/disp-nis.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/disp-nis.c b/src/disp-nis.c
index a5716fe..ce78462 100644
--- a/src/disp-nis.c
+++ b/src/disp-nis.c
@@ -81,7 +81,7 @@ struct dispatch_client {
client_replying_final,
} client_state;
/* The client's request while we're reading it. */
- char client_inbuf[4096];
+ char client_inbuf[8192];
ssize_t client_inbuf_used;
char *client_query;
ssize_t client_query_size;
@@ -717,8 +717,9 @@ client_read(struct plugin_state *state, struct dispatch_client *client)
len = ntohl(nlen);
last = ((len & 0x80000000) != 0);
len &= 0x7fffffff;
- if (len > 0x10000) {
- /* Disconnect, because that's just ridiculous. */
+ if (len > sizeof(client->client_inbuf) - 4) {
+ /* Disconnect, because that's more data than we could
+ * have read. */
slapi_log_error(SLAPI_LOG_FATAL,
state->plugin_desc->spd_id,
"client fragment claims to be %d bytes "