1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Backported from 5.5 for 5.4 by Remi Collet
From 9c19a08b9daed6bae3071dd25742f59a59618823 Mon Sep 17 00:00:00 2001
From: Anatol Belski <ab@php.net>
Date: Wed, 16 Mar 2016 09:48:40 +0100
Subject: [PATCH] Fixed bug #71704 php_snmp_error() Format String Vulnerability
Conflicts:
ext/snmp/snmp.c
---
ext/snmp/snmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index f7c99c1..6c1da4c 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -533,7 +533,7 @@ static void php_snmp_error(zval *object, const char *docref TSRMLS_DC, int type,
}
if (object && (snmp_object->exceptions_enabled & type)) {
- zend_throw_exception_ex(php_snmp_exception_ce, type TSRMLS_CC, snmp_object->snmp_errstr);
+ zend_throw_exception_ex(php_snmp_exception_ce, type TSRMLS_CC, "%s", snmp_object->snmp_errstr);
} else {
va_start(args, format);
php_verror(docref, "", E_WARNING, format, args TSRMLS_CC);
|