[redland-dev] [Raptor RDF Syntax Library 0000576]: Wrong assert for a counted string being nul terminated
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Mon Aug 4 16:28:46 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=576
======================================================================
Reported By: porton
Assigned To:
======================================================================
Project: Raptor RDF Syntax Library
Issue ID: 576
Category: api
Reproducibility: always
Severity: major
Priority: normal
Status: new
Syntax Name:
======================================================================
Date Submitted: 2014-08-04 20:28
Last Modified: 2014-08-04 20:28
======================================================================
Summary: Wrong assert for a counted string being nul
terminated
Description:
>From Raptor 2.0.14 source of the function raptor_new_uri_from_counted_string():
#ifdef DEBUG
RAPTOR_ASSERT(strlen((const char*)uri_string) != length,
"URI string is not declared length");
#endif
This checks the string uri_string to be NULL terminated, even despite that the
documentation for this function says: "Note: The uri_string need not be NULL
terminated - a NULL will be added to the copied string used."
At best it will (in debug mode) trigger "URI string is not declared length"
assertion. At worst it will reach the end of an OS allocated memory block and
trigger SIGSEGV or something like this.
Don't close this bug, until all C sources are inspected to note there are no
similar bugs in other functions.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-08-04 20:28 porton New Issue
======================================================================
More information about the redland-dev
mailing list