On 03/31/2016 03:45 PM, Roberto Fichera
wrote:
... and here is the fix. str->slen isn't initialized because comes from a local variable, only the ->ptr is initialized correctly. diff --git a/pjlib/src/pj/guid_android.c b/pjlib/src/pj/guid_android.c index 02d473c..f68be20 100644 --- a/pjlib/src/pj/guid_android.c +++ b/pjlib/src/pj/guid_android.c @@ -103,7 +103,7 @@ PJ_DEF(pj_str_t*) pj_generate_unique_string(pj_str_t *str) native_str.ptr = (char *)native_string; native_str.slen = pj_ansi_strlen(native_string); - pj_strncpy(str, &native_str, str->slen); + pj_strncpy(str, &native_str, native_str.slen); (*jni_env)->ReleaseStringUTFChars(jni_env, uuid_string, native_string); detach_jvm(attached);
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org