qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs util.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs util.c
Date: Thu, 13 Dec 2007 23:13:11 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/13 23:13:11

Modified files:
        .              : util.c 

Log message:
        fixed subtle bug in qe_realloc: store NULL ptr upon realloc to size 0

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/util.c?cvsroot=qemacs&r1=1.23&r2=1.24

Patches:
Index: util.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/util.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- util.c      12 Dec 2007 11:49:03 -0000      1.23
+++ util.c      13 Dec 2007 23:13:11 -0000      1.24
@@ -1084,7 +1084,7 @@
 void *qe_realloc(void *pp, size_t size)
 {
     void *p = realloc(*(void **)pp, size);
-    if (p)
+    if (p || !size)
         *(void **)pp = p;
     return p;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]