Bug 74500

Summary: cairo-boilerplate-getopt.c:63]: (style) Array index 'argv_index' is used before limits check.
Product: cairo Reporter: dcb314
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.