#37920 [NEW]: Hardcoded ASCII values in cgi_main.c

From: Date: Mon, 26 Jun 2006 21:23:41 +0000
Subject: #37920 [NEW]: Hardcoded ASCII values in cgi_main.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98806@lists.php.net to get a copy of this message
From:             agiorgio at optonline dot net
Operating system: 
PHP version:      5.1.5CVS
PHP Bug Type:     *Compile Issues
Bug description:  Hardcoded ASCII values in cgi_main.c

Description:
------------
There are hardcoded ASCII values in cgi_main.c.  0x10 should be '\n' and
0x13 should be '\r'.

Reproduce code:
---------------
while (c != 10 && c != 13) {
	c = fgetc(file_handle.handle.fp);	/* skip to end of line */
}
/* handle situations where line is terminated by \r\n */
if (c == 13) {
	if (fgetc(file_handle.handle.fp) != 10) {
		long pos = ftell(file_handle.handle.fp);
		fseek(file_handle.handle.fp, pos - 1, SEEK_SET);
	}
}


-- 
Edit bug report at http://bugs.php.net/?id=37920&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37920&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37920&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37920&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37920&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=37920&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37920&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37920&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37920&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37920&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37920&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=37920&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=37920&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37920&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37920&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37920&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37920&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37920&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37920&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37920&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37920&r=mysqlcfg


Thread (4 messages)

« previous php.bugs (#98806) next »