]> sjero.net Git - linphone/commitdiff
fix stack overflow with linphonec without readline, asking for password
authorSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Apr 2011 19:05:08 +0000 (21:05 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Apr 2011 19:05:08 +0000 (21:05 +0200)
console/linphonec.c

index de3ce9e44c740d509d6c8d5b8fb75f8bdcdfff1d..38cf24f28e6d1ec69a0f39b16dfa7368591431fc 100644 (file)
@@ -794,11 +794,17 @@ linphonec_finish(int exit_status)
 int
 linphonec_prompt_for_auth_final(LinphoneCore *lc)
 {
+       static int reentrancy=0;
        char *input, *iptr;
        char auth_prompt[256];
 #ifdef HAVE_READLINE
        rl_hook_func_t *old_event_hook;
 #endif
+
+       if (reentrancy!=0) return 0;
+       
+       reentrancy++;
+       
        LinphoneAuthInfo *pending_auth=auth_stack.elem[auth_stack.nitems-1];
 
        snprintf(auth_prompt, 256, "Password for %s on %s: ",