com php-src: Merge branch 'PHP-5.6': ext/fileinfo/libmagic/print.c

From: Date: Tue, 30 Dec 2014 18:41:07 +0000
Subject: com php-src: Merge branch 'PHP-5.6': ext/fileinfo/libmagic/print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83941@lists.php.net to get a copy of this message
Commit: a78eaddbe00d5832ccca8d48a745e1d36e67874c Author: Anatol Belski <ab@php.net> Tue, 30 Dec 2014 19:41:07 +0100 Parents: 2d561e0e26a511225ffafb25020c4931c6c17ae4 85b4a6552029b1f3fdb39251f37986fafcb958a1 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a78eaddbe00d5832ccca8d48a745e1d36e67874c Log: Merge branch 'PHP-5.6' * PHP-5.6: updated NEWS Fixed bug #68671 incorrect expression in libmagic Conflicts: ext/fileinfo/libmagic/print.c Bugs: https://bugs.php.net/68671 Changed paths: MM ext/fileinfo/libmagic/print.c Diff: diff --cc ext/fileinfo/libmagic/print.c index 7e4a812,26bb2f7..b028801 --- a/ext/fileinfo/libmagic/print.c +++ b/ext/fileinfo/libmagic/print.c @@@ -59,15 -59,19 +59,18 @@@ protected voi file_magwarn(struct magic_set *ms, const char *f, ...) { va_list va; - char *expanded_format; + char *expanded_format = NULL; + int expanded_len; - TSRMLS_FETCH(); va_start(va, f); - if (vasprintf(&expanded_format, f, va)); /* silence */ + expanded_len = vasprintf(&expanded_format, f, va); va_end(va); - php_error_docref(NULL, E_NOTICE, "Warning: %s", expanded_format); + if (expanded_len >= 0 && expanded_format) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Warning: %s", expanded_format); ++ php_error_docref(NULL, E_NOTICE, "Warning: %s", expanded_format); - free(expanded_format); + free(expanded_format); + } } protected const char *

« previous php.cvs (#83941) next »