[FFmpeg-trac] #7666(swscale:new): Signed integer overflow when converting to ya16

FFmpeg trac at avcodec.org
Thu Jan 10 22:06:54 EET 2019


#7666: Signed integer overflow when converting to ya16
--------------------------------------+---------------------------------
               Reporter:  cehoyos     |                  Owner:
                   Type:  defect      |                 Status:  new
               Priority:  important   |              Component:  swscale
                Version:  git-master  |               Keywords:  ubsan
             Blocked By:              |               Blocking:
Reproduced by developer:  0           |  Analyzed by developer:  0
--------------------------------------+---------------------------------
 {{{
 $ make tests/vsynth1/00.pgm
 $ ffmpeg -vcodec pgmyuv -i tests/vsynth1/%02d.pgm -pix_fmt ya16le -f null
 -
 ffmpeg version N-92942-g02b6d1d Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 6.4.0 (GCC)
   configuration: --enable-gpl --toolchain=gcc-usan
   libavutil      56. 25.100 / 56. 25.100
   libavcodec     58. 43.100 / 58. 43.100
   libavformat    58. 25.100 / 58. 25.100
   libavdevice    58.  6.101 / 58.  6.101
   libavfilter     7. 47.100 /  7. 47.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, image2, from 'tests/vsynth1/%02d.pgm':
   Duration: 00:00:02.00, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: pgmyuv, yuv420p, 352x288, 25 fps, 25 tbr, 25 tbn,
 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (pgmyuv (native) -> wrapped_avframe (native))
 Press [q] to stop, [?] for help
 libswscale/output.c:920:15: runtime error: signed integer overflow:
 2147311616 + 262144 cannot be represented in type 'int'
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf58.25.100
     Stream #0:0: Video: wrapped_avframe, ya16le, 352x288, q=2-31, 200
 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.43.100 wrapped_avframe
 frame=   50 fps=0.0 q=-0.0 Lsize=N/A time=00:00:02.00 bitrate=N/A
 speed=28.2x
 video:26kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}
 Tested on x86_64, same error with `--enable-ftrapv`

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7666>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list