Opened 8 years ago
Closed 8 years ago
#6160 closed defect (fixed)
Valgrind error in mpegps_read_header
Reported by: | Міхаіл | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | avformat |
Version: | git-master | Keywords: | mpegps ubsan |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I noticed strange crashes working on my own code and attempted to run it under valgrind. The error reported by the tool is there even with the stock ffmpeg-executable -- without my code in the equation.
How to reproduce:
% valgrind ffmpeg -i robot.avi ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers built with FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 ... ==52950== Conditional jump or move depends on uninitialised value(s) ==52950== at 0x554F02F: mpegps_read_header (mpeg.c:148) ==52950== by 0x55D43DA: avformat_open_input (utils.c:593) ==52950== by 0x40F881: ??? (in /opt/bin/ffmpeg) ==52950== by 0x40F10C: ??? (in /opt/bin/ffmpeg) ==52950== by 0x40EE93: ??? (in /opt/bin/ffmpeg) ==52950== by 0x41AC7B: ??? (in /opt/bin/ffmpeg) ==52950== by 0x408F8E: ??? (in /opt/bin/ffmpeg) ==52950== by 0x4020FFF: ??? ==52950==
The reported line mpeg.c:148 reads:
if (!memcmp("IMKH", buffer, 4)) {
Attachments (1)
Change History (2)
by , 8 years ago
comment:1 by , 8 years ago
Keywords: | mpegps ubsan added |
---|---|
Priority: | normal → minor |
Resolution: | → fixed |
Status: | new → closed |
Version: | unspecified → git-master |
I wasn't able to reproduce (and I wonder how memcmp() must be implemented for this issue to occur) but should be fixed in a5c1c7a8b3d13c86b453558628951c3f52054ab4
Note:
See TracTickets
for help on using tickets.
The sample input (from php-ffmpeg test_media)