Commit d72019e1 authored by François Cartegnie's avatar François Cartegnie 🤞

codec: opus: check comment size overflow

parent 9df13395
......@@ -286,6 +286,9 @@ static int comment_pad(char **comments, size_t *length)
const unsigned padding = 512; /* default from opus-tools */
if(SIZE_MAX - *length < padding + 255)
return 1;
char *p = *comments;
/* Make sure there is at least "padding" worth of padding free, and
round up to the maximum that fits in the current ogg segments. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment