Changeset 1067:a2d7c244141b in roaraudio for libroar/simple.c


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

make OpenBSD security warnings patch a bit happyer...: sprintf() -> snprintf()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r690 r1067  
    122122 
    123123 if ( type == ROAR_SOCKET_TYPE_UNIX ) { 
    124   sprintf(file, "/tmp/.libroar-simple-stream.%i-%i", getpid(), count++); 
     124  snprintf(file, 79, "/tmp/.libroar-simple-stream.%i-%i", getpid(), count++); 
    125125 } else if ( type == ROAR_SOCKET_TYPE_DECNET ) { 
    126126  if ( roar_socket_get_local_nodename() ) { 
    127    sprintf(file, "%s::roar$TMP%04x%02x", roar_socket_get_local_nodename(), getpid(), count++); 
     127   snprintf(file, 24,"%s::roar$TMP%04x%02x", roar_socket_get_local_nodename(), getpid(), count++); 
    128128  } else { 
    129129   return -1; 
Note: See TracChangeset for help on using the changeset viewer.