in segfault). (pdan-php at esync dot org, Tony)
- Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
parameters). (Jani)
+- Fixed bug #29733 (printf() handles repeated placeholders wrong).
+ (bugs dot php dot net at bluetwanger dot de, Ilia)
- Fixed bug #29136 (make test - libtool failure on MacOSX). (Jani)
- Fixed bug #28976 (mail(): use "From:" from headers if sendmail_from is empty).
(Jani)
php_sprintf_appendchar(&result, &outpos, &size, '%' TSRMLS_CC);
inpos += 2;
} else {
- if (currarg >= argc && format[inpos + 1] != '%') {
- efree(result);
- efree(args);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too few arguments");
- return NULL;
- }
/* starting a new format specifier, reset variables */
alignment = ALIGN_RIGHT;
adjusting = 0;
}
argnum += format_offset;
-
- if (argnum >= argc) {
- efree(result);
- efree(args);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too few arguments");
- return NULL;
- }
/* after argnum comes modifiers */
PRINTF_DEBUG(("sprintf: looking for modifiers\n"
argnum = currarg++ + format_offset;
}
+ if (argnum >= argc) {
+ efree(result);
+ efree(args);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too few arguments");
+ return NULL;
+ }
+
if (format[inpos] == 'l') {
inpos++;
}