]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2001-04-07 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Mon, 9 Apr 2001 21:23:38 +0000 (21:23 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 9 Apr 2001 21:23:38 +0000 (21:23 +0000)
* mach/msgserver.c (__mach_msg_server_timeout): Add an assert.

mach/msgserver.c

index c11ea9a699a1400af6310d7c75aeaada58a747d7..12343537cca75687feccc6e0c02894b2a7e3c970 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 /*
  * HISTORY
  * $Log$
+ * Revision 1.6  2001/04/09 21:23:38  roland
+ * 2001-04-07  Roland McGrath  <roland@frob.com>
+ *
+ *     * mach/msgserver.c (__mach_msg_server_timeout): Add an assert.
+ *
  * Revision 1.5  1996/12/20 01:32:35  drepper
  * Update from main archive 961219
  *
@@ -83,6 +88,7 @@
 #include <mach.h>
 #include <mach/mig_errors.h>
 #include <stdlib.h>            /* For malloc and free.  */
+#include <assert.h>
 
 mach_msg_return_t
 __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
@@ -116,6 +122,7 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
             Pass it to DEMUX for processing.  */
 
          (void) (*demux) (&request->Head, &reply->Head);
+         assert (reply->Head.msgh_size <= max_size);
 
          switch (reply->RetCode)
            {