You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Scott Cantor (JIRA)" <ji...@apache.org> on 2017/09/11 01:24:00 UTC

[jira] [Updated] (SANTUARIO-474) Better overflow checking

     [ https://issues.apache.org/jira/browse/SANTUARIO-474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Cantor updated SANTUARIO-474:
-----------------------------------
    Summary: Better overflow checking  (was: safeBuffer doubts)

> Better overflow checking
> ------------------------
>
>                 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
>             Fix For: C++ 2.0.0
>
>
> 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)