Opened 16 months ago
Closed 3 months 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 16 months ago by heleppkes
comment:2 Changed 3 months ago by richardpl
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
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.