Changeset 5225


Ignore:
Timestamp:
Dec 31, 2015 1:59:35 AM (4 years ago)
Author:
ming
Message:

Re #1882 (misc): re r5222, fixed string truncation length checking (the string is null terminated) in srtp.

Thanks to Dusan Klinec for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/srtp/crypto/math/datatypes.c

    r5222 r5225  
    114114 
    115115  /* truncate string if it would be too long */ 
    116   if (length >= MAX_PRINT_STRING_LEN) 
    117     length = MAX_PRINT_STRING_LEN-1; 
     116  if (length >= MAX_PRINT_STRING_LEN-1) 
     117    length = MAX_PRINT_STRING_LEN-2; 
    118118   
    119119  for (i=0; i < length; i+=2) { 
Note: See TracChangeset for help on using the changeset viewer.