File php-5.1.2-CVE-2007-0907.patch of Package php

--- main/SAPI.c
+++ main/SAPI.c
@@ -563,7 +563,7 @@ SAPI_API int sapi_header_op(sapi_header_
 	header_line = estrndup(header_line, header_line_len);
 
 	/* cut of trailing spaces, linefeeds and carriage-returns */
-	while(isspace(header_line[header_line_len-1])) 
+	while(header_line_len && isspace(header_line[header_line_len-1]))
 		  header_line[--header_line_len]='\0';
 	
 	/* new line safety check */
openSUSE Build Service is sponsored by