Changeset 4049:802580eeb8a8 in roaraudio


Ignore:
Timestamp:
07/09/10 15:46:06 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed security warnings

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/roard/protocol-rplay.c

    r3988 r4049  
    219219 s -= m * 60; 
    220220 
    221  sprintf(uptime, "%.2i:%.2i:%.2i", h, m, s); 
     221 snprintf(uptime, sizeof(uptime)-1, "%.2i:%.2i:%.2i", h, m, s); 
     222 uptime[sizeof(uptime)-1] = 0; 
    222223 
    223224 switch (ROAR_CODEC_BYTE_ORDER(g_sa->codec)) { 
  • roard/meta.c

    r3811 r4049  
    6464   } 
    6565 
    66    if ( (c = malloc(strlen(val)+1)) == NULL ) { 
     66   if ( (c = strdup(val)) == NULL ) { 
    6767    s->meta[i].type = ROAR_META_TYPE_NONE; 
    6868    s->meta[i].key[0] = 0; 
     
    7070   } 
    7171 
    72    strcpy(c, val); 
    7372   s->meta[i].value = c; 
    7473 
  • roard/roard.c

    r4012 r4049  
    444444 
    445445  if ( p->port ) { 
    446    sprintf(port, "%i", p->port); 
     446   snprintf(port, sizeof(port)-1, "%i", p->port); 
     447   port[sizeof(port)-1] = 0; 
    447448  } else { 
    448449   strcpy(port, "(none)"); 
Note: See TracChangeset for help on using the changeset viewer.