]> granicus.if.org Git - php/commitdiff
Fixed bug #68739 #68740 #68741
authorXinchen Hui <laruence@php.net>
Thu, 8 Jan 2015 08:09:02 +0000 (16:09 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 8 Jan 2015 08:09:02 +0000 (16:09 +0800)
ext/curl/interface.c
ext/ereg/regex/regcomp.c
ext/pgsql/pgsql.c

index f5bfb1e91928e37d5907f6623c6777d4f727b3dd..0c267e06810cbbf282b48614bd741ccf2de76454 100644 (file)
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
                                        curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share);
                                }
                        }
+                       break;
 
 #if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
                case CURLOPT_FNMATCH_FUNCTION:
index 730bcf568a5b37c5bb3e28224a0ca0d4a80b2b33..f55862b9222c39ee20db0cc80361fe581485e254 100644 (file)
@@ -1276,6 +1276,10 @@ int c;
        register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
        register unsigned uc = (unsigned char)c;
 
+       if (!g->setbits) {
+               return(0);
+       }
+
        for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
                if (col[uc] != 0)
                        return(1);
index e4aab66e000a7b2f921fd803fccf38b2e674b248..0469c8b1ba6ea704e89265c7a4f64a4d08d0ab47 100644 (file)
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c
        /* schame.table should be "schame"."table" */
        table_copy = estrdup(table);
        token = php_strtok_r(table_copy, ".", &tmp);
+       if (token == NULL) {
+               token = table;
+       }
        len = strlen(token);
        if (_php_pgsql_detect_identifier_escape(token, len) == SUCCESS) {
                smart_str_appendl(querystr, token, len);