OSSP CVS Repository

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

Check-in Number: 1962
Date: 2002-Mar-07 12:23:33 (local)
2002-Mar-07 11:23:33 (UTC)
User:rse
Branch:
Comment: Oops, the NUL-terminating check is done later, so do not destroy it by already reducing the size in advance. Else an exactly sized buffer (including space for the NUL-termination) would result in an unexpected error.
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.c      1.55 -> 1.56     1 inserted, 1 deleted

ossp-pkg/sa/sa.c 1.55 -> 1.56

--- sa.c 2002/01/30 16:43:00     1.55
+++ sa.c 2002/03/07 11:23:33     1.56
@@ -382,7 +382,7 @@
     else {
         /* perform real output */
         ctx.bufptr = buffer;
-        ctx.buflen = bufsize - 1;
+        ctx.buflen = bufsize;
         n = sa_mvxprintf(sa_mvsnprintf_cb, &ctx, format, ap);
     }
     if (n != -1 && ctx.buflen == 0)

CVSTrac 2.0.1