From 552244684884ba85a38a1ec65d30fc1133d313b8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 27 Jul 2006 14:39:33 +0200 Subject: [PATCH] server: Don't crash on invalid request sizes. --- server/request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/request.c b/server/request.c index d0e1a88278c..765ec7a82c9 100644 --- a/server/request.c +++ b/server/request.c @@ -318,7 +318,11 @@ void read_request( struct thread *thread ) 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 */