Skip to content

Commit cb38be1

Browse files
author
Moriyoshi Koizumi
committed
Fixed segfault in xml_parser_create()
# due to too many %s in printf spec
1 parent 6965f22 commit cb38be1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/xml/xml.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ PHP_FUNCTION(xml_parser_create)
10271027
Z_STRLEN_PP(encodingArg)) == 0) {
10281028
encoding = "US-ASCII";
10291029
} else { /* UTF-16 not supported */
1030-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg));
1030+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg));
10311031
RETURN_FALSE;
10321032
}
10331033
} else {
@@ -1076,7 +1076,7 @@ PHP_FUNCTION(xml_parser_create_ns)
10761076
Z_STRLEN_PP(encodingArg)) == 0) {
10771077
encoding = "US-ASCII";
10781078
} else { /* UTF-16 not supported */
1079-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg));
1079+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unsupported source encoding \"%s\"", Z_STRVAL_PP(encodingArg));
10801080
RETURN_FALSE;
10811081
}
10821082
} else {
@@ -1131,9 +1131,9 @@ PHP_FUNCTION(xml_set_object)
11311131
parser->object = *mythis;
11321132

11331133
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
1134-
#ifdef ZEND_ENGINE_2
1134+
/* #ifdef ZEND_ENGINE_2
11351135
zval_add_ref(&parser->object);
1136-
#endif
1136+
#endif */
11371137

11381138
RETVAL_TRUE;
11391139
}

0 commit comments

Comments
 (0)