Bug 332270 - cantor-4.12.3/src/backends/qalculate/qalculateexpression.cpp:224]: (style) Array index 'i' is used before limits check.
Summary: cantor-4.12.3/src/backends/qalculate/qalculateexpression.cpp:224]: (style) Ar...
Status: RESOLVED INTENTIONAL
Alias: None
Product: cantor
Classification: Applications
Component: qualculate-backend (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Filipe Saraiva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 08:33 UTC by dcb314
Modified: 2016-05-26 20:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2014-03-18 08:33:51 UTC
Source code is

    if (argument[i] == '\\' && i < argument.size()-1)
        ++i;

Maybe better code might be

    if ( i < argument.size()-1 && argument[i] == '\\')
        ++i;



Reproducible: Always
Comment 1 Filipe Saraiva 2016-05-26 20:04:38 UTC
Thanks for your idea.