php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #72157
Patch p.diff revision 2016-05-04 14:34 UTC by shm@php.net

Patch p.diff for Reproducible crash Bug #72157

Patch version 2016-05-04 14:34 UTC

Return to Bug #72157 | Download this patch
Patch Revisions:

Developer: shm@php.net

--- php-7.0.6-orig/ext/dba/dba.c     2016-04-28 20:12:42.000000000 +0200
+++ php-7.0.6/ext/dba/dba.c     2016-05-03 17:08:59.886661904 +0100
@@ -658,11 +658,14 @@ static void php_dba_open(INTERNAL_FUNCTI
 
        /* we only take string arguments */
        for (i = 0; i < ac; i++) {
+               if (Z_REFCOUNTED(args[i])) {
+                       Z_ADDREF(args[i]);
+               }
+
                if (Z_TYPE(args[i]) != IS_STRING) {
                        convert_to_string_ex(&args[i]);
-               } else if (Z_REFCOUNTED(args[i])) {
-                       Z_ADDREF(args[i]);
                }
+
                keylen += Z_STRLEN(args[i]);
        }

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC