Opened 14 months ago

Closed 2 weeks ago

#6746 closed defect (invalid)

libpostproc/postprocess.c: 2 * array index sanity check in odd place ?

Reported by: dcb Owned by:
Priority: normal Component: postproc
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

[ffmpeg-3.4/libpostproc/postprocess.c:804]: (style) Array index 'o' is used before limits check.
[ffmpeg-3.4/libpostproc/postprocess.c:818]: (style) Array index 'o' is used before limits check.

Source code is

for(o=0; options[o] && o<2; o++){

and

for(o=0; options[o] && o<1; o++){

Change History (2)

comment:1 Changed 14 months ago by heleppkes

The array is NULL terminated, the first condition will stop the loop before anything bad happens, so the order doesn't really make any difference. It just limits the number of loop executions.

comment:2 Changed 2 weeks ago by richardpl

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.