]> granicus.if.org Git - php/commitdiff
- Enforce termination to prevent possible SEGVs
authorMarcus Boerger <helly@php.net>
Mon, 12 Dec 2005 19:10:12 +0000 (19:10 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 12 Dec 2005 19:10:12 +0000 (19:10 +0000)
Zend/zend_operators.c

index 12437019557f1d965790983fb48d39134b6a5876..adc19c2c70452ac2e41de9e05ec1f3a39dc56af6 100644 (file)
@@ -1783,7 +1783,7 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned in
        while (str < end) {
                *result++ = tolower((int)*str++);
        }
-       *result = *end;
+       *result = '\0';
 
        return dest;
 }