Changeset 5272 for pjproject


Ignore:
Timestamp:
Apr 1, 2016 2:34:48 AM (5 years ago)
Author:
riza
Message:

Re #1909: Fixed crash related to r5264.

  • pj_generate_unique_string() expecting the user to specify the slen of the output string, this will lead to assert on pj_strncpy() if not set
  • modify PJ_GUID_STRING_LENGTH to 36
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/guid_android.c

    r5264 r5272  
    4848 
    4949 
    50 PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=37; 
     50PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=36; 
    5151 
    5252PJ_DEF(unsigned) pj_GUID_STRING_LENGTH() 
     
    104104    native_str.ptr = (char *)native_string; 
    105105    native_str.slen = pj_ansi_strlen(native_string); 
    106     pj_strncpy(str, &native_str, str->slen); 
     106    pj_strncpy(str, &native_str, PJ_GUID_STRING_LENGTH); 
    107107 
    108108    (*jni_env)->ReleaseStringUTFChars(jni_env, uuid_string, native_string); 
Note: See TracChangeset for help on using the changeset viewer.