]> granicus.if.org Git - php/commitdiff
- It's better to use our own strtol here
authorMarcus Boerger <helly@php.net>
Sat, 29 Oct 2005 15:49:28 +0000 (15:49 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 29 Oct 2005 15:49:28 +0000 (15:49 +0000)
ext/standard/php_fopen_wrapper.c

index d15ec90452899d66ca0069db5334a04f9f0387ef..9cb2e8fe70af28c5aac4544ab065fe57d8fc7db1 100644 (file)
@@ -163,7 +163,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch
                max_memory = PHP_STREAM_MAX_MEM;
                if (!strncasecmp(path, "/maxmemory:", 11)) {
                        path += 11;
-                       sscanf(path, "%ld", &max_memory);
+                       max_memory = strtol(path, NULL, 10);
                        if (max_memory < 0) {
                                php_error_docref(NULL TSRMLS_CC, E_ERROR, "Max memory must be >= 0");
                                return NULL;