httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject bounds checking and vsprintf
Date Wed, 01 Jan 1997 03:18:47 GMT
How the heck do I do decent bounds checking with vsprintf?  vsnprintf
isn't portable enough, and I can't think of any other method that isn't a
horrible hack.

Perhaps the easiest way would somehow involve going through the argument
list, figuring out how long each argument will be, then dynamically
allocating the memory before calling vsprintf.  But I don't see an easy
way to figure out how long each of the arguments will be when printed.
Sigh.

Suggestions?

(I'm hoping to have my buffer overflow patches ready for review tomorrow
or the day after; rewritelog() in mod_rewrite is one of the things I still
have to fix, and it uses vsprintf.  <sigh>) 



Mime
View raw message