Bug #68739 [Opn->Csd]: Missing break / control flow

From: Date: Thu, 08 Jan 2015 08:09:52 +0000
Subject: Bug #68739 [Opn->Csd]: Missing break / control flow
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189729@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68739&edit=1 ID: 68739 Updated by: laruence@php.net Reported by: bugreports at internot dot info Summary: Missing break / control flow -Status: Open +Status: Closed Type: Bug Package: cURL related Operating System: Linux Ubuntu 14.04 PHP Version: master-Git-2015-01-04 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=124fb22a13fafa3648e4e15b4f207c7096d8155e Log: Fixed bug #68739 #68740 #68741 Previous Comments: ------------------------------------------------------------------------ [2015-01-04 10:08:22] bugreports at internot dot info 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 this bug report at https://bugs.php.net/bug.php?id=68739&edit=1

« previous php.bugs (#189729) next »