Changeset 5028:bda7085a07b8 in roaraudio for libroar/vio_proto.c


Ignore:
Timestamp:
05/28/11 11:46:46 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed some ckport warnings about poissible buffer overflows which are not possible because buffer length is ensured before the call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_proto.c

    r4843 r5028  
    448448  return NULL; 
    449449 
    450  inlen = strlen(up->user) + strlen(up->pass) + 2; 
     450 inlen = roar_mm_strlen(up->user) + roar_mm_strlen(up->pass) + 2; 
    451451 inbuf = roar_mm_malloc(inlen); 
    452452 if ( inbuf == NULL ) 
     
    454454 
    455455 inbuf[0] = 0; 
    456  strcat(inbuf, up->user); 
    457  strcat(inbuf, ":"); 
    458  strcat(inbuf, up->pass); 
     456 roar_mm_strlcat(inbuf, up->user, inlen); 
     457 roar_mm_strlcat(inbuf, ":", inlen); 
     458 roar_mm_strlcat(inbuf, up->pass, inlen); 
    459459 
    460460 outlen = ((inlen * 3) / 2) + 3 /* padding... */ + 6 /* 'Basic ' */; 
Note: See TracChangeset for help on using the changeset viewer.