File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ PHP NEWS
25
25
. Fixed bug #67643 (curl_multi_getcontent returns '' when
26
26
CURLOPT_RETURNTRANSFER isn't set). (Jille Timmermans)
27
27
28
+ - Fileinfo:
29
+ . Fixed bug #68671 (incorrect expression in libmagic).
30
+ (Joshua Rogers, Anatol Belski)
31
+
28
32
- GD:
29
33
. Fixed bug #68601 (buffer read overflow in gd_gif_in.c). (Jan Bee, Remi)
30
34
Original file line number Diff line number Diff line change @@ -59,16 +59,19 @@ protected void
59
59
file_magwarn (struct magic_set * ms , const char * f , ...)
60
60
{
61
61
va_list va ;
62
- char * expanded_format ;
62
+ char * expanded_format = NULL ;
63
+ int expanded_len ;
63
64
TSRMLS_FETCH ();
64
65
65
66
va_start (va , f );
66
- if ( vasprintf (& expanded_format , f , va )); /* silence */
67
+ expanded_len = vasprintf (& expanded_format , f , va );
67
68
va_end (va );
68
69
69
- php_error_docref (NULL TSRMLS_CC , E_NOTICE , "Warning: %s" , expanded_format );
70
+ if (expanded_len >= 0 && expanded_format ) {
71
+ php_error_docref (NULL TSRMLS_CC , E_NOTICE , "Warning: %s" , expanded_format );
70
72
71
- free (expanded_format );
73
+ free (expanded_format );
74
+ }
72
75
}
73
76
74
77
protected const char *
You can’t perform that action at this time.
0 commit comments