]> granicus.if.org Git - php/commitdiff
Fixed bug #71704 php_snmp_error() Format String Vulnerability
authorAnatol Belski <ab@php.net>
Wed, 16 Mar 2016 08:48:40 +0000 (09:48 +0100)
committerAnatol Belski <ab@php.net>
Wed, 16 Mar 2016 08:48:40 +0000 (09:48 +0100)
ext/snmp/snmp.c

index be8888c348ccd3979180bb2d620b487632eb3731..67e39f1645c28ec410dc271439c9d1f8a8071a12 100644 (file)
@@ -530,7 +530,7 @@ static void php_snmp_error(zval *object, const char *docref, int type, const cha
        }
 
        if (object && (snmp_object->exceptions_enabled & type)) {
-               zend_throw_exception_ex(php_snmp_exception_ce, type, snmp_object->snmp_errstr);
+               zend_throw_exception_ex(php_snmp_exception_ce, type, "%s", snmp_object->snmp_errstr);
        } else {
                va_start(args, format);
                php_verror(docref, "", E_WARNING, format, args);