From: Dmitry Stogov Date: Thu, 30 Nov 2017 11:54:11 +0000 (+0300) Subject: Replace always true condition with ZEND_ASSERT() X-Git-Tag: php-7.3.0alpha1~908 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d736aa400958413742a556dc0b973ad66392b8b;p=php Replace always true condition with ZEND_ASSERT() --- diff --git a/ext/standard/math.c b/ext/standard/math.c index 8285edeeda..ed367823ed 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -929,9 +929,10 @@ PHPAPI zend_string * _php_math_longtobase(zval *arg, int base) *ptr = '\0'; do { + ZEND_ASSERT(ptr > buf); *--ptr = digits[value % base]; value /= base; - } while (ptr > buf && value); + } while (value); return zend_string_init(ptr, end - ptr, 0); }