]> granicus.if.org Git - python/commitdiff
Add assertion that we do not blow out newl
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 27 Jan 2008 17:10:29 +0000 (17:10 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 27 Jan 2008 17:10:29 +0000 (17:10 +0000)
Parser/tokenizer.c

index 257ef1c87b80fec51faed22048992eefb1d17686..1314f5f1398bf20e02ab2ce62606681ceae3553e 100644 (file)
@@ -605,6 +605,7 @@ decode_str(const char *str, struct tok_state *tok)
        for (s = str;; s++) {
                if (*s == '\0') break;
                else if (*s == '\n') {
+                       assert(lineno < 2);
                        newl[lineno] = s;
                        lineno++;
                        if (lineno == 2) break;