mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-25 07:29:54 +00:00
[PR #1981] [MERGED] fix(epg): Silence snprintf buffer truncation warnings #2780
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1981
Author: @cfsmp3
Created: 1/5/2026
Status: ✅ Merged
Merged: 1/5/2026
Merged by: @cfsmp3
Base:
master← Head:fix/epg-snprintf-buffer-warning📝 Commits (1)
e3d1c56fix(epg): Silence snprintf buffer truncation warnings📊 Changes
2 files changed (+3 additions, -3 deletions)
View changed files
📝
src/lib_ccx/ts_functions.h(+2 -2)📝
src/lib_ccx/ts_tables_epg.c(+1 -1)📄 Description
Summary
Extends EPG time string buffers from 21 to 74 bytes to silence compiler warnings about potential buffer truncation.
Problem
Every build showed warnings like:
Solution
The actual output is always 20 chars (
YYYYMMDDHHMMSS +0000) plus null terminator, but the compiler warns because%02dwithintarguments could theoretically produce larger output (e.g., if year were somehow negative or very large).Extended buffers to 74 bytes to match the compiler's calculated maximum, eliminating the warning while maintaining correct functionality.
Changes
ts_functions.h:start_time_string[21]→start_time_string[74]ts_functions.h:end_time_string[21]→end_time_string[74]ts_tables_epg.c:snprintf(output, 21, ...)→snprintf(output, 74, ...)Test Plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.