After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657032 - rest_xml_parser_parse_from_data() should take -1
rest_xml_parser_parse_from_data() should take -1
Status: RESOLVED FIXED
Product: librest
Classification: Platform
Component: xml-parser
git master
Other Linux
: Normal normal
: ---
Assigned To: librest-maint
librest-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-21 19:48 UTC by Rob Staudinger
Modified: 2012-06-18 07:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Accept -1 len in rest_xml_parser_parse_from_data (1.35 KB, patch)
2012-06-17 11:29 UTC, Christophe Fergeau
committed Details | Review

Description Rob Staudinger 2011-08-21 19:48:16 UTC
rest_xml_parser_parse_from_data() takes goffset len, i.e. a signed parameter, but doesn't interpret a value of < 0 to read the entire, zero-terminated buffer. Would be nice.
Comment 1 Christophe Fergeau 2012-06-17 11:29:03 UTC
Created attachment 216599 [details] [review]
Accept -1 len in rest_xml_parser_parse_from_data

This means that the passed in string is nul-terminated and that
rest_xml_parser_parse_from_data should get its length with strlen.
Comment 2 Ross Burton 2012-06-17 18:46:01 UTC
Review of attachment 216599 [details] [review]:

Looks good.
Comment 3 Christophe Fergeau 2012-06-18 07:37:51 UTC
Attachment 216599 [details] pushed as 68d3302 - Accept -1 len in rest_xml_parser_parse_from_data