Re: [PATCH] input.c: optimize mp_cmd list.

Ingo Brückl <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
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
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.