Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] input.c: optimize mp_cmd list.




Reimar Döffinger wrote on Sat, 13 Feb 2016 23:12:32 +0100:

> Reduce its size and encode strings directly
> to avoid relocations.

> -        mp_cmd->name = strdup("panscan");
> +        strcpy(mp_cmd->name, "panscan");

> -  char* name;
> +  char name[24];

Since nobody knows about the size of name, a secure string copy with length
of name and null-termination would be preferable.

Ingo
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng