[Python-checkins] r46661 - in python/trunk: Misc/NEWS Modules/cjkcodecs/_codecs_jp.c
hyeshik.chang
python-checkins at python.org
Mon Jun 5 03:00:04 CEST 2006
Author: hyeshik.chang
Date: Mon Jun 5 02:59:54 2006
New Revision: 46661
Modified:
python/trunk/Misc/NEWS
python/trunk/Modules/cjkcodecs/_codecs_jp.c
Log:
Fix a potentially invalid memory access of CJKCodecs' shift-jis
decoder. (found by Neal Norwitz)
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon Jun 5 02:59:54 2006
@@ -75,6 +75,8 @@
Extension Modules
-----------------
+- Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder.
+
- Patch #1478788 (modified version): The functional extension module has
been renamed to _functools and a functools Python wrapper module added.
This provides a home for additional function related utilities that are
Modified: python/trunk/Modules/cjkcodecs/_codecs_jp.c
==============================================================================
--- python/trunk/Modules/cjkcodecs/_codecs_jp.c (original)
+++ python/trunk/Modules/cjkcodecs/_codecs_jp.c Mon Jun 5 02:59:54 2006
@@ -639,10 +639,11 @@
REQUIRE_OUTBUF(1)
JISX0201_DECODE(c, **outbuf)
else if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)){
- unsigned char c1, c2 = IN2;
+ unsigned char c1, c2;
ucs4_t code;
REQUIRE_INBUF(2)
+ c2 = IN2;
if (c2 < 0x40 || (c2 > 0x7e && c2 < 0x80) || c2 > 0xfc)
return 2;
More information about the Python-checkins
mailing list