This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: buffer problem in pyexpat.c(xmlparse_GetInputContext)
Type: Stage:
Components: XML Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, tobiasjs
Priority: high Keywords:

Created on 2004-03-29 06:47 by tobiasjs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pyexpat.diff tobiasjs, 2004-03-29 06:47 pyexpat.c diff
Messages (2)
msg20371 - (view) Author: Tobias Sargeant (tobiasjs) Date: 2004-03-29 06:47
xmlparse_GetInputContext doesn't adjust the bounds of the 
substring it returns, leading to the python string result hanging off 
one or more ends of the buffer & associated nastiness.

2 line fix attached.
msg20372 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-04 14:41
Logged In: YES 
user_id=21627

Thanks for the patch. This was just resubmitted as #1118602,
which I have
applied. Your patch also checks whether offset is negative;
I believe this cannot happen.

Committed as

pyexpat.c 2.90 and 2.89.2.1
NEWS 1.1264 and 1.1193.2.31

Sorry this took so long; it would have caught my attention
earlier if it was in the patches tracker, not the bugs tracker.
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40097
2004-03-29 06:47:37tobiasjscreate