pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] pspp/src/libpspp str.c ChangeLog


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/libpspp str.c ChangeLog
Date: Mon, 17 Apr 2006 03:36:40 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Branch:         
Changes by:     Ben Pfaff <address@hidden>      06/04/17 03:36:40

Modified files:
        src/libpspp    : str.c ChangeLog 

Log message:
        Make ds_vprintf() properly handle a null string.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/str.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/ChangeLog.diff?tr1=1.10&tr2=1.11&r1=text&r2=text

Patches:
Index: pspp/src/libpspp/ChangeLog
diff -u pspp/src/libpspp/ChangeLog:1.10 pspp/src/libpspp/ChangeLog:1.11
--- pspp/src/libpspp/ChangeLog:1.10     Mon Apr 17 02:13:38 2006
+++ pspp/src/libpspp/ChangeLog  Mon Apr 17 03:36:40 2006
@@ -1,3 +1,8 @@
+Sun Apr 16 20:33:19 2006  Ben Pfaff  <address@hidden>
+
+       * str.c (ds_vprintf): Don't try to write into the string if it is
+       null.
+
 Sun Apr 16 18:52:41 2006  Ben Pfaff  <address@hidden>
 
        GNU standards require "file name" instead of "filename" in
Index: pspp/src/libpspp/str.c
diff -u pspp/src/libpspp/str.c:1.5 pspp/src/libpspp/str.c:1.6
--- pspp/src/libpspp/str.c:1.5  Mon Apr  3 20:07:54 2006
+++ pspp/src/libpspp/str.c      Mon Apr 17 03:36:40 2006
@@ -704,7 +704,7 @@
 #endif
 
   va_copy (args, args_);
-  avail = st->capacity - st->length + 1;
+  avail = st->string != NULL ? st->capacity - st->length + 1 : 0;
   needed = vsnprintf (st->string + st->length, avail, format, args);
   va_end (args);
 




reply via email to

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