From: Anatol Belski Date: Thu, 19 Mar 2015 12:43:24 +0000 (+0100) Subject: fix condition X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=184793b5c1e7a9df67e542893b69bace5cd7a67c;p=php fix condition --- diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 6715d7f878..ff4241b563 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1474,7 +1474,7 @@ not_relative_path: const char *exec_fname = exec_filename->val; size_t exec_fname_length = exec_filename->len; - while ((--exec_fname_length >= 0) && !IS_SLASH(exec_fname[exec_fname_length])); + while ((--exec_fname_length < SIZE_MAX) && !IS_SLASH(exec_fname[exec_fname_length])); if (exec_fname_length<=0) { /* no path */ pathbuf = estrdup(path);