|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2006, Version 4.4.3
- Updated PCRE to version 6.6. (Andrei)
+- Added overflow checks to wordwrap() function. (Ilia)
- Added a check for special characters in the session name. (Ilia)
- Fixed bug #36459 (Incorrect adding PHPSESSID to links, which contains \r\n).
(Ilia)
/* Multiple character line break or forced cut */
if (linelength > 0) {
chk = (int)(textlen/linelength + 1);
+ newtext = safe_emalloc(chk, breakcharlen, textlen + 1);
alloced = textlen + chk * breakcharlen + 1;
} else {
chk = textlen;
+ newtext = safe_emalloc(textlen, (breakcharlen + 1), 1);
alloced = textlen * (breakcharlen + 1) + 1;
}
- if (alloced <= 0) {
- RETURN_FALSE;
- }
- newtext = emalloc(alloced);
/* now keep track of the actual new text length */
newtextlen = 0;