[FFmpeg-devel] [PATCH 1/2] assdec: avoid a possible NULL dereference.

Nicolas George nicolas.george at normalesup.org
Wed Feb 29 14:00:51 CET 2012


Le primidi 11 ventôse, an CCXX, Nicolas George a écrit :
> [PATCH 1/2] assdec: avoid a possible NULL dereference.
> [PATCH 2/2] ass_split: accept files with only \n and no \r.

Current ffmpeg segfaults with the attached file. The problem is that it is
encoded in Unix text format, with only LF (\n) line terminators.

The second patch fixes that.

With only the first patch, the file returns a decode failure instead of a
segfault; I believe it is necessary too, because ff_ass_split_dialog may
fail for other reasons.

Regards,

-- 
  Nicolas George
-------------- next part --------------
?[Script Info]
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,DejaVu Sans,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,3,1,2,110,110,40,0
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:20.00,0:00:21.00,Default,,0000,0000,0000,,Test!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120229/444285fb/attachment.asc>


More information about the ffmpeg-devel mailing list