• Walter Dörwald's avatar
    Fix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces · b1773918
    Walter Dörwald authored
    when an encoding error occurs and the callback name is unknown,
    i.e. when the callback has to be called. The problem was that
    the fact that the callback has already been looked up was only
    recorded in a local variable in charmap_encoding_error(), because
    charmap_encoding_error() got it's own copy of the errorHandler
    pointer instead of a pointer to the pointer in
    PyUnicode_EncodeCharmap().
    b1773918
unicodeobject.c 174 KB