From 6cf6ce675dd84b10e019759bfe2b181513e95f7d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 22 Apr 2011 21:05:08 +0200 Subject: [PATCH] fix stack overflow with linphonec without readline, asking for password --- console/linphonec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/console/linphonec.c b/console/linphonec.c index de3ce9e4..38cf24f2 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -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: ", -- 2.39.2