]> granicus.if.org Git - python/commit
Fix to a bug found by Florian Weimer:
authorMarc-André Lemburg <mal@egenix.com>
Sun, 16 Jul 2000 13:29:13 +0000 (13:29 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Sun, 16 Jul 2000 13:29:13 +0000 (13:29 +0000)
commitfb625847bfc9fb3ebf548b8c32a9accd21868d18
tree4cfa75e340ee27724d9cc27670c0a3136b894042
parent7e47402264cf87b9bbb61fc9ff610af08add7c7b
Fix to a bug found by Florian Weimer:

The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's
stress test), mainly due to the following construct:

    #define UTF8_ERROR(details)  do {                       \
        if (utf8_decoding_error(&s, &p, errors, details))   \
            goto onError;                                   \
        continue;                                           \
    } while (0)

(The "continue" statement is supposed to exit from the outer loop,
but of course, it doesn't.  Indeed, this is a marvelous example of
the dangers of the C programming language and especially of the C
preprocessor.)
Objects/unicodeobject.c