OSSP CVS Repository

ossp - Check-in [2737]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2737
Date: 2002-Nov-05 17:18:46 (local)
2002-Nov-05 16:18:46 (UTC)
User:mlelstv
Branch:
Comment: more sanity checking

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/sio/sio_fd.c      1.5 -> 1.6     3 inserted, 0 deleted

ossp-pkg/sio/sio_fd.c 1.5 -> 1.6

--- sio_fd.c     2002/11/05 16:05:25     1.5
+++ sio_fd.c     2002/11/05 16:18:46     1.6
@@ -94,6 +94,9 @@
     size_t n;
 
     n = buf->size;
+    if (n == 0)
+        return SIO_ERR_ARG;
+
     p = realloc(buf->mem, n);
     if (p != NULL)
         buf->mem = p;

CVSTrac 2.0.1