Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in / Register
F
ffmpeg
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • submodule
  • ffmpeg
  • Repository

Switch branch/tag
  • ffmpeg
  • libavformat
  • hls.c
Find file
BlameHistoryPermalink
  • Andreas Rheinhardt's avatar
    avformat/hls: Don't strdup non-null-terminated string · 9dfc409e
    Andreas Rheinhardt authored Mar 03, 2020
    If an URI indicated that the data protocol was in use, it would be
    copied into a temporary buffer via strncpy(dst, src, strlen(src)),
    thereby ensuring that the trailing \0 would not be copied, despite dst
    being uninitialized. dst would then be av_strdup'ed, leading to
    potential segfaults.
    
    The solution to this is simple: Don't copy the URI in the temporary
    buffer at all, instead av_strdup it directly.
    
    This fixes a -Wstringop-truncation warning emitted by GCC 9.2.
    Reviewed-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    9dfc409e
hls.c 79.9 KB
EditWeb IDE

Replace hls.c

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.