[redland-dev] [Redland Python Binding 0000313]: Unicode to UTF8 buffer overflows
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Tue Sep 29 21:58:02 CEST 2009
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=313
======================================================================
Reported By: marcello
Assigned To:
======================================================================
Project: Redland Python Binding
Issue ID: 313
Category:
Reproducibility: always
Severity: crash
Priority: normal
Status: new
======================================================================
Date Submitted: 2009-09-29 19:57
Last Modified: 2009-09-29 19:57
======================================================================
Summary: Unicode to UTF8 buffer overflows
Description:
UTF-8 characters converted from UCS2 can be up to 3 bytes long. See:
http://www.ietf.org/rfc/rfc2279.txt
This buffer will overflow:
/bindings/trunk/python/redland-post.i
Py_UNICODE* input=(Py_UNICODE*)PyUnicode_AS_DATA(unicod);
size_t len=PyUnicode_GET_DATA_SIZE(unicod);
int i, j;
output=(char*)malloc(len+1); /* too long but saves double-scanning */
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-09-29 19:57 marcello New Issue
======================================================================
More information about the redland-dev
mailing list