]> granicus.if.org Git - php/commitdiff
Do these ops in the right order here. First of many fixes for
authorRasmus Lerdorf <rasmus@php.net>
Fri, 6 Aug 2010 18:19:23 +0000 (18:19 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 6 Aug 2010 18:19:23 +0000 (18:19 +0000)
bug #52550

ext/standard/var_unserializer.re

index 1498d27680e47acbb6acd31987942f13c929e6a4..b1b5d34efe1d83cf5d3ccc70c89d12f8fc5fe001 100644 (file)
@@ -231,7 +231,7 @@ static inline long parse_iv2(const unsigned char *p, const unsigned char **q)
        while (1) {
                cursor = (char)*p;
                if (cursor >= '0' && cursor <= '9') {
-                       result = result * 10 + cursor - '0';
+                       result = result * 10 + (size_t)(cursor - (unsigned char)'0');
                } else {
                        break;
                }