[MPlayer-dev-eng] [PATCH] Fix potential overflow in get_metadata
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Dec 19 13:03:57 CET 2010
On Thu, Dec 16, 2010 at 11:07:00PM +0100, Clément Bœsch wrote:
> char *get_metadata (metadata_t type) {
> - char *meta = NULL;
> + char meta[16];
Please use something like 100, this one:
"%d Hz, %d ch.", while not for valid values, in general
can already expand to 36 bytes or so.
Seems ok otherwise, I was thinking about factoring out
the strdup(meta) but I suspect it might be a bad idea.
More information about the MPlayer-dev-eng
mailing list