curl-library
Re: Core dump when authentication fails?
Date: Fri, 27 May 2011 14:23:26 -0400
>
>
> I don't have the libssh2 source, but it seems another similar patch is
> necessary. It got past the place where it crashed the last time, but
> now it's crashing further down userauth.c.
>
> Perhaps you could see if there's another call to LIBSSH2_ALLOC() that
> you can skip if the second argument is 0 like Daniel did in the patch.
>
Ok, I did that for some (but not all) of the calls to LIBSSH2_ALLOC(). See
attachment.
The reason I didn't do it for all is because I wasn't sure how much of the
code to include in the block that gets executed if the second arg to
LIBSSH2_ALLOC is non-zero. I didn't want to break anything.
Now it's crashing in a different place:
Assertion failed: ptr != NULL, file memdebug.c, line 253
Abort (core dumped)
Below is the dbx output:
[1] __lwp_kill(0x0, 0x6, 0x0, 0x6, 0xffbffeff, 0x0), at 0xfeccc5f8
[2] raise(0x6, 0x0, 0x0, 0xfecabf18, 0xffffffff, 0x6), at 0xfec65a5c
[3] abort(0xffbfe7a0, 0x1, 0xfed313ac, 0xeeb60, 0xfed333d8, 0x0), at
0xfec4194c
[4] __assert(0xff30e74c, 0xff30e664, 0xfd, 0x27178, 0xee87c, 0xff3418f8),
at 0xfec41b88
=>[5] curl_dofree(ptr = (nil), line = 320, source = 0xff310d18 "ssh.c"),
line 253 in "memdebug.c"
[6] my_libssh2_free(ptr = (nil), abstract = 0x71b88), line 320 in "ssh.c"
[7] userauth_keyboard_interactive(session = 0x71b88, username = 0x27118
"lis", username_len = 3U, response_callback = 0xff1aa958 =
&`libcurl.so.4.2.0`ssh.c`kbd_callback(const char *name, int name_len, const
char *instruction, int instruction_len, int num_prompts, const
LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE
*responses, void **abstract)), line 1681 in "userauth.c"
[8] libssh2_userauth_keyboard_interactive_ex(session = 0x71b88, user =
0x27118 "lis", user_len = 3U, response_callback = 0xff1aa958 =
&`libcurl.so.4.2.0`ssh.c`kbd_callback(const char *name, int name_len, const
char *instruction, int instruction_len, int num_prompts, const
LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE
*responses, void **abstract)), line 1707 in "userauth.c"
[9] ssh_statemach_act(conn = 0x70e38, block = 0xffbff060), line 905 in
"ssh.c"
[10] ssh_multi_statemach(conn = 0x70e38, done = 0xffbff184), line 2481 in
"ssh.c"
[11] Curl_protocol_connecting(conn = 0x70e38, done = 0xffbff184), line
3259 in "url.c"
[12] multi_runsingle(multi = 0x4e358, now = RECORD, easy = 0x4a380), line
1188 in "multi.c"
[13] curl_multi_perform(multi_handle = 0x4e358, running_handles =
0xffbff2f0), line 1712 in "multi.c"
[14] main(), line 117 in "myProg.C"
- Saqib
> [...]
> > [7] userauth_keyboard_interactive(session = 0x73d10, username = 0x27118
> > "lis", username_len = 3U, response_callback = 0xff1aa958 =
> > &`libcurl.so.4.2.0`ssh.c`kbd_callback(const char *name, int name_len,
> const
> > char *instruction, int instruction_len, int num_prompts, const
> > LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE
> > *responses, void **abstract)), line 1489 in "userauth.c"
> [...]
>
> --
> Michael Wood <esiotrot_at_gmail.com>
>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-27