Commit 677d4122 authored by jehan's avatar jehan

test if number to normilize is empty

parent 12f68e20
......@@ -276,6 +276,10 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_normalizePhone
const char* number = env->GetStringUTFChars(jnumber, NULL);
int len = env->GetStringLength(jnumber);
if (len == 0) {
ms_warning("cannot normalize empty number");
return jnumber;
char targetBuff[2*len];// returned number can be greater than origin (specially in case of prefix insertion
jstring normalizedNumber = env->NewStringUTF(targetBuff);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment