Bug #68739 [NEW]: Missing break / control flow

From: Date: Sun, 04 Jan 2015 10:08:23 +0000
Subject: Bug #68739 [NEW]: Missing break / control flow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189638@lists.php.net to get a copy of this message
From: bugreports at internot dot info Operating system: Linux Ubuntu 14.04 PHP version: master-Git-2015-01-04 (Git) Package: cURL related Bug Type: Bug Bug description:Missing break / control flow Description: ------------ Hi, In /ext/curl/interface.c: 2716 case CURLOPT_SHARE: 2717 { 2718 php_curlsh *sh = NULL; 2719 ZEND_FETCH_RESOURCE_NO_RETURN(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); 2720 if (sh) { 2721 curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); 2722 } 2723 } This is missing a break; Although it may look like it's just going to fall to the next one on purpose, I don't think it is, since.. 2725#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ fallthrough: The above case falls through to this one. 2726 case CURLOPT_FNMATCH_FUNCTION: 2727 curl_easy_setopt(ch->cp, CURLOPT_FNMATCH_FUNCTION, curl_fnmatch); 2728 curl_easy_setopt(ch->cp, CURLOPT_FNMATCH_DATA, ch); 2729 if (ch->handlers->fnmatch == NULL) { 2730 ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); 2731 } else if (!Z_ISUNDEF(ch->handlers->fnmatch->func_name)) { 2732 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); 2733 ch->handlers->fnmatch->fci_cache = empty_fcall_info_cache; 2734 } 2735 ZVAL_COPY(&ch->handlers->fnmatch->func_name, zvalue); 2736 ch->handlers->fnmatch->method = PHP_CURL_USER; 2737 break; 2738#endif If "LIBCURL_VERSION_NUM >= 0x071500" is false, then no break; will ever be used. Thanks, -- Edit bug report at https://bugs.php.net/bug.php?id=68739&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68739&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68739&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68739&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68739&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68739&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68739&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68739&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68739&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68739&r=support Expected behavior: https://bugs.php.net/fix.php?id=68739&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68739&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68739&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68739&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68739&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68739&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68739&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68739&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68739&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68739&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68739&r=mysqlcfg

« previous php.bugs (#189638) next »