[cairo-bugs] [Bug 74500] New: cairo-boilerplate-getopt.c:63]: (style) Array index 'argv_index' is used before limits check.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 4 11:58:13 CET 2014


https://bugs.freedesktop.org/show_bug.cgi?id=74500

          Priority: medium
            Bug ID: 74500
          Assignee: chris at chris-wilson.co.uk
           Summary: cairo-boilerplate-getopt.c:63]: (style) Array index
                    'argv_index' is used before limits check.
        QA Contact: cairo-bugs at cairographics.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: dcb314 at hotmail.com
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: general
           Product: cairo

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140204/52776dcf/attachment.html>


More information about the cairo-bugs mailing list