Opened 3 years ago

Closed 2 years 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


[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++){


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

Change History (2)

comment:1 Changed 3 years 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 years ago by richardpl

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