A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/023005.html below:

[Python-Dev] Regression in unicodestr.encode()?

[Python-Dev] Regression in unicodestr.encode()? [Python-Dev] Regression in unicodestr.encode()?Martin v. Loewis martin@v.loewis.de
10 Apr 2002 21:03:06 +0200
"M.-A. Lemburg" <mal@lemburg.com> writes:

> Some debugging with gdb indicates that the codec is indeed writing
> the 'nd', but the final _PyString_Resize() (which allocates a new
> buffer and copies the data into that buffer) fails to copy the last
> two characters from the string or overwrites it with NULLs.
>
> Looks like a pymalloc problem to me. Tim ?

It's a UTF-8 codec bug. The codec writes over the end of the buffer,
then invokes resize. Resizing only copies the allocated bytes, hence
the uninitialized bytes at the end.

Regards,
Martin





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4