]> granicus.if.org Git - python/commitdiff
Don't try to put a value into a NULL pointer.
authorMark Dickinson <dickinsm@gmail.com>
Wed, 20 Jan 2010 18:02:41 +0000 (18:02 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 20 Jan 2010 18:02:41 +0000 (18:02 +0000)
Python/dtoa.c

index 671d02795ad2963a95dc1a8129157a5c927bcd13..9e3c5d82408d4e735513478cdeeccfe04f0dee1b 100644 (file)
@@ -1485,7 +1485,8 @@ _Py_dg_strtod(const char *s00, char **se)
        gives the total number of digits ignoring leading zeros.  A valid input
        must have at least one digit. */
     if (!nd && !lz) {
-        *se = (char *)s00;
+        if (se)
+            *se = (char *)s00;
         goto parse_error;
     }