Bug 74500 - cairo-boilerplate-getopt.c:63]: (style) Array index 'argv_index' is used before limits check.
Summary: cairo-boilerplate-getopt.c:63]: (style) Array index 'argv_index' is used befo...
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 10:58 UTC by dcb314
Modified: 2018-08-25 13:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description dcb314 2014-02-04 10:58:13 UTC
Static analyser cppcheck found the above problem.

Source code is

      while(prev_argv[++argv_index] && prev_argv[argv_index][0] != '-'
            && argv_index < argv_index2+1);

Suggest put limit check before use.
Comment 1 GitLab Migration User 2018-08-25 13:44:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/169.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.