[FFmpeg-trac] #11194(avformat:new): image2 frame_pts integer overflow

FFmpeg trac at avcodec.org
Mon Sep 16 19:54:43 EEST 2024


#11194: image2 frame_pts integer overflow
-------------------------------------+-------------------------------------
             Reporter:  Filip        |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  image2       |               Blocked By:
  frame_pts                          |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Filip):

 [https://github.com/FFmpeg/FFmpeg/blob/ceb471cfde901d47e705dd32abba1ea8eab269fa/libavformat/utils.c#L283]
 I think the best solution is to just change the parameter type of
 "number", currently int, to uint64_t. The function av_get_frame_filename2
 is called in many places with an int "number" argument, except for via the
 frame_pts codepath, where it's a uint64_t "number" argument. It seems
 safer to me to cast int into uint64_t rather than the other way round, and
 I don't foresee any side-effects, though I'm inexperienced with C. Shall I
 try to submit that as a patch?
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11194#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list