Changes between Initial Version and Version 1 of Ticket #3466
- Timestamp:
- Mar 16, 2014, 9:25:48 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3466
- Property Component ffmpeg → undetermined
- Property Summary PVS-Studio → PVS-Studio static code analysis
-
Ticket #3466 – Description
initial v1 1 1 Analyzer PVS-Studio (http://www.viva64.com/) slowly learns to check Linux projects. Currently can not very well. However, tool was able to find some suspicious code. I checked the project FFmpeg. Maybe something here is errors: 2 2 {{{ 3 3 V501 There are identical sub-expressions '!srcSlice' to the left and to the right of the '||' operator. swscale.c 924 4 4 … … 20 20 .... 21 21 } 22 ------------------------------------------------------------------------------- 22 }}} 23 {{{ 23 24 V512 A call of the 'memcpy' function will lead to underflow of the buffer 'frame->data'. vf_shuffleplanes.c 98 24 25 … … 36 37 .... 37 38 } 38 ------------------------------------------------------------------------------- 39 }}} 40 {{{ 39 41 V557 Array overrun is possible. The '8' index is pointing beyond array bound. mjpegenc.c 497 40 42 V557 Array overrun is possible. The '9' index is pointing beyond array bound. mjpegenc.c 499 … … 52 54 .... 53 55 } 54 55 56 #add 56 57 V557 Array overrun is possible. The '6' index is pointing beyond array bound. mjpegenc.c 504 … … 60 61 V557 Array overrun is possible. The '6' index is pointing beyond array bound. mjpegenc.c 516 61 62 V557 Array overrun is possible. The '7' index is pointing beyond array bound. mjpegenc.c 518 62 ------------------------------------------------------------------------------- 63 }}} 64 {{{ 63 65 V564 The '&' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' operator. dcadec.c 1373 64 66 … … 73 75 .... 74 76 } 75 ------------------------------------------------------------------------------- 77 }}} 78 {{{ 76 79 V564 The '&' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' operator. vc1dec.c 3675 77 80 … … 85 88 .... 86 89 } 87 ------------------------------------------------------------------------------- 90 }}} 91 {{{ 88 92 V593 Consider reviewing the expression of the 'A = B < C' kind. The expression is calculated as following: 'A = (B < C)'. fic.c 245 89 93 … … 96 100 .... 97 101 } 98 ------------------------------------------------------------------------------- 102 }}} 103 {{{ 99 104 V595 The 'ts->pids[pid]' pointer was utilized before it was verified against nullptr. Check lines: 1377, 1379. mpegts.c 1377 100 105 … … 107 112 .... 108 113 } 109 ------------------------------------------------------------------------------- 114 }}} 115 {{{ 110 116 V610 Undefined behavior. Check the shift operator '<<. The left operand '-1' is negative. diracdec.c 1358 111 117 … … 170 176 V610 Undefined behavior. Check the shift operator '<<. The left operand '-128' is negative. output.c 1036 171 177 V610 Undefined behavior. Check the shift operator '<<. The left operand '-128' is negative. output.c 1037 172 ------------------------------------------------------------------------------- 178 }}} 179 {{{ 173 180 V614 Potentially uninitialized variable 'info_bits' used. g723_1.c 2335 174 181 … … 185 192 return frame_size[info_bits]; 186 193 } 187 ------------------------------------------------------------------------------- 194 }}} 195 {{{ 188 196 V636 The 'i / 4' expression was implicitly casted from 'int' type to 'double' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;. mpegaudio_tablegen.h 48 189 197 … … 205 213 V636 The 's->avctx->rc_buffer_size / 2' expression was implicitly casted from 'int' type to 'double' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;. ratecontrol.c 961 206 214 V636 The '1 * s->out.ch_count / s->in.ch_count' expression was implicitly casted from 'int' type to 'double' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;. swresample.c 386 207 ------------------------------------------------------------------------------- 215 }}} 216 {{{ 208 217 V640 The code's operational logic does not correspond with its formatting. The statement is indented to the right, but it is always executed. It is possible that curly brackets are missing. vc1dec.c 1917 209 218 … … 218 227 .... 219 228 } 220 ------------------------------------------------------------------------------- 221 229 }}} 222 230 P.S. Errors description: http://www.viva64.com/en/d/ 223 231


