Menu

#24 IPv6 connection causes segfault

open
nobody
None
5
2017-03-15
2014-04-11
Cookiemon
No

Using irc_connect6 causes irc_add_select_descriptors to segfault

System is current debian stable.

Minimal example is attached.
Compiled with gcc -lssl -lcrypto -lircclient segfault.c
According to valgrind and gdb the segfault happens during irc_run calling irc_add_select_descriptors and changing irc_connect6 to irc_connect removes the segfault.

1 Attachments

Discussion

  • Cookiemon

    Cookiemon - 2014-04-11

    libircclient.c line 820 copies the struct sockaddr_in6 into a irc_session_t->local_addr overwriting the two variables behind it. This causes the given error. Patch fixing it is attached.

     
  • Erich Eckner

    Erich Eckner - 2017-03-15

    If it helps the decision to implement this patch:
    I can confirm this bug and that the patch resolves it.
    Thanks, Cookiemon!

     

Log in to post a comment.