diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/php/php/CVE-2017-9120.patch')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/php/php/CVE-2017-9120.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/CVE-2017-9120.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/CVE-2017-9120.patch new file mode 100644 index 000000000..728f25bb6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/CVE-2017-9120.patch @@ -0,0 +1,21 @@ +php: patch for CVE-2017-9120 + +Upstream-Status: Backport [https://bugs.php.net/bug.php?id=74544] + +CVE: CVE-2017-9120 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c +index 03a39d7..7b88731 100644 +--- a/ext/mysqli/mysqli_api.c ++++ b/ext/mysqli/mysqli_api.c +@@ -1965,7 +1965,7 @@ PHP_FUNCTION(mysqli_real_escape_string) { + } + MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); + +- newstr = zend_string_alloc(2 * escapestr_len, 0); ++ newstr = zend_string_safe_alloc(2, escapestr_len, 0, 0); + ZSTR_LEN(newstr) = mysql_real_escape_string(mysql->mysql, ZSTR_VAL(newstr), escapestr, escapestr_len); + newstr = zend_string_truncate(newstr, ZSTR_LEN(newstr), 0); + |