You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Ferenc Wágner (JIRA)" <ji...@apache.org> on 2017/09/08 12:02:00 UTC
[jira] [Created] (SANTUARIO-474) safeBuffer doubts
Ferenc Wágner created SANTUARIO-474:
---------------------------------------
Summary: safeBuffer doubts
Key: SANTUARIO-474
URL: https://issues.apache.org/jira/browse/SANTUARIO-474
Project: Santuario
Issue Type: Bug
Components: C++
Affects Versions: C++ 1.7.3
Reporter: Ferenc Wágner
Assignee: Scott Cantor
While looking at those few remaining compiler warnings, I encountered code in {{safeBuffer::checkAndExpand}} like this:
{code}
if (size + 1 < bufferSize)
return;
// Make the new size twice the size of the new string requirement
xsecsize_t newBufferSize = size * 2;
{code}
(We're dealing with unsigned quantities here.)
Shouldn't there be overflow checks everywhere?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)