[MPlayer-dev-eng] [PATCH 1/4] String handling audit/cleanup

Nicholas Kain njkain at gmail.com
Fri Mar 2 21:57:52 CET 2007


On 3/2/07, Alex Beregszaszi <alex at rtfs.hu> wrote:
> As a general rule I would consider sending such patches in one diff file
> for a directory.

I'll do so in the future.  I wasn't sure what level of subdivision was
preferred.

> in cpudetect.c:
>
> -       sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs
> +3),(char*)(regs+2));
> +       snprintf(vendor, sizeof vendor, "%.4s%.4s%.4s",(char*)(regs
> +1),(char*)(regs+3),(char*)(regs+2));
>
> change this to sizeof(vendor)
>
> I see this is an issue in other files too.

I'll change the style of the code.

> Regarding unrarlib.c: please send it to upstream too!

Yep, I'll do that, although I'll most likely have to send a slightly
different patch using strncpy().



More information about the MPlayer-dev-eng mailing list