[MPlayer-dev-eng] [PATCH] input.c: optimize mp_cmd list.
    Ingo Brückl 
    ib at wupperonline.de
       
    Sat Feb 13 23:25:07 CET 2016
    
    
  
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
    
    
More information about the MPlayer-dev-eng
mailing list