server: Don't crash on invalid request sizes.
diff --git a/server/request.c b/server/request.c
index d0e1a88..765ec7a 100644
--- a/server/request.c
+++ b/server/request.c
@@ -318,7 +318,11 @@
return;
}
if (!(thread->req_data = malloc( thread->req_toread )))
- fatal_protocol_error( thread, "no memory for %d bytes request\n", thread->req_toread );
+ {
+ fatal_protocol_error( thread, "no memory for %u bytes request %d\n",
+ thread->req_toread, thread->req.request_header.req );
+ return;
+ }
}
/* read the variable sized data */