Re: eval() bug?

From: Date: Fri, 11 Jun 1999 16:37:18 +0000
Subject: Re: eval() bug?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-1499@lists.php.net to get a copy of this message
Really? Hmm, that's weird. I never protect against NULL's in printf()'s, just about any implementation I saw prints (null), and doesn't crash. That's kind of bad. Zeev On Fri, 11 Jun 1999, Andrey Zmievski wrote: > Zeev Suraski wrote: > > BTW, I tried to reproduce it on Windows 95, Windows NT and Linux (RH 4.1) > > - none of them crashes. It's REALLY weird that you're crashing in an OS > > internal function (vsprintf() if I remember correctly), especially since > > it seems that the arguments it receives are 100% ok. > > Ok, I figured out why it was crashing. Line 433 in main.c is: > > php3_printf("<br>\n<b>%s</b>: %s in <b>%s</b> on line > <b>%d</b><br>\n", > error_ > type_str, buffer, error_filename, error_lineno); > > And when the error happens inside eval(), error_filename is NULL, and any > *printf() function crashes on a %s being NULL. > > -Andrey > * I wish life had an UNDO function. * > -- ----------------------------------------------------- Zeev Suraski <zeev@zend.com> For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#1499) next »