Bugtraq mailing list archives

Re: QPOPPER problem....


From: marc () SNAFU ORG (Marco S Hyman)
Date: Sat, 27 Jun 1998 15:40:11 -0700


"Bruno Lopes F. Cabral" writes:
 #ifdef HAVE_VPRINTF
-        vsprintf(mp,format,ap);
+        vsnprintf(mp,sizeof(message) - strlen(mp) -1,format,ap);

I don't think so.  Check out the code... mp is pointing at the terminating
null from the previous sprintf.  In effect you've coded
sizeof( message ) - -1.  Not what you wanted at all.

// marc



Current thread: