Changeset 1068:cd86a0f4adab in roaraudio for libroar/meta.c


Ignore:
Timestamp:
12/28/08 02:40:49 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

make OpenBSD security warnings patch a bit happyer...: strcpy() -> strncpy()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/meta.c

    r1037 r1068  
    8585char * roar_meta_strtype(int type) { 
    8686 int i; 
    87  static char name[24]; 
     87 static char name[ROAR_META_MAX_NAMELEN]; 
    8888 
    8989 for (i = 0; _libroar_meta_typelist[i].id != -1; i++) 
    9090  if ( _libroar_meta_typelist[i].id == type ) { 
    91    strcpy(name, _libroar_meta_typelist[i].name); 
     91   strncpy(name, _libroar_meta_typelist[i].name, ROAR_META_MAX_NAMELEN); 
    9292   return name; 
    9393  } 
Note: See TracChangeset for help on using the changeset viewer.