CESNET / libnetconf

C NETCONF library
Other
113 stars 83 forks source link

possible crash send sending notifications #259

Open ntadas opened 7 years ago

ntadas commented 7 years ago

Hi,

In session.c line 1572 https://github.com/CESNET/libnetconf/blob/master/src/session.c#L1572 the strlen (text) should be checked before accessing the content of the text. currently I'm having a crash (very sporadic) and I was able to nail it until here (not sure the content of "text" when the crash happens).

`#2 0x0f230968 in crashHandler (signo=, sigInfo=, ptr=) at ../base/src/crashHandler.c:62

3

4 0x4821bfac in write () from /lib/libpthread.so.0

5 0x0fb7b850 in nc_session_send (session=0x26d59ef0, msg=0x2a29a0c0) at src/session.c:1572

6 0x0fb7ea78 in nc_session_send_reply (session=0x26d59ef0, rpc=0x2a29a330, reply=0x268f7ef0) at src/session.c:2945

`