Ignore:
Timestamp:
Oct 8, 2013 9:08:13 AM (9 years ago)
Author:
bennylp
Message:

Re #1703: fixing general bugs. First installment: correct handling of snprintf return value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/ffmpeg_util.c

    r4537 r4613  
    115115        AVClass* avc = *(AVClass**)ptr; 
    116116        len = pj_ansi_snprintf(buf, bufsize, "%s: ", avc->item_name(ptr)); 
     117        if (len < 1 || len >= bufsize) 
     118            len = bufsize - 1; 
    117119        bufsize -= len; 
    118120    } 
Note: See TracChangeset for help on using the changeset viewer.