Alexandre Julliard : server: Don't crash on invalid request sizes.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 27 08:18:48 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 552244684884ba85a38a1ec65d30fc1133d313b8
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=552244684884ba85a38a1ec65d30fc1133d313b8

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jul 27 14:39:33 2006 +0200

server: Don't crash on invalid request sizes.

---

 server/request.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

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 @@ 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 */




More information about the wine-cvs mailing list