avformat/dash: Do not write into zero sized buffers in ff_dash_fill_tmpl_params()

The check is the one recommended in the report.

Fixes: lNi0cBMALYfT
Fixes: AISLE-2026-0111-00522
Fixes: AISLE-2026-0110-00522
Fixes: AISLE-2026-0109-00522
Found-by: Joshua Rogers <joshua.rogers@aisle.com>
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-10-11 02:37:58 +00:00
1 parent c329af9873
commit b5902e69c7
1 file changed
+2
+2
View File
@@ -98,6 +98,8 @@ void ff_dash_fill_tmpl_params(char *dst, size_t buffer_size,
int64_t time) {
int dst_pos = 0;
const char *t_cur = template;
if (!buffer_size)
return;
while (dst_pos < buffer_size - 1 && *t_cur) {
char format_tag[7]; // May be "%d", "%0Xd", or "%0Xlld" (for $Time$), where X is in [0-9]
int n = 0;