[Libwebsockets] Segmentation fault caused by NULL value in output.c

Nikolay Dimitrov ndimitrov at setelis.com
Sat Dec 21 14:34:08 CET 2013


Thank you very much for the fast response.

Best Regards,
Nikolay Dimitrov


On Sat, Dec 21, 2013 at 4:27 AM, "Andy Green (林安廸)" <andy at warmcat.com>wrote:

> On 21/12/13 02:48, the mail apparently from Nikolay Dimitrov included:
>
>  Hello,
>> I'm having two problems with libwebsockets:
>> 1) http://libwebsockets.org/trac/register doesn't work ("Environment not
>> found") - that is why I'm using the mailing list instead of the bug
>> tracker
>>
>
> Thanks... seems OOM killer killing httpd leaves something unhappy... I
> restarted apache and he's working again.
>
>
>  2) In line 389 in output.c there is a:
>> goto do_more_inside_frame
>> and then in line 536 dropmask is used:
>> dropmask[n] = dropmask[n]
>> however it is pointing to NULL, because its value is set after the goto
>> on line 437:
>> dropmask = &buf[0 - pre];
>>
>
> Yes, it's nonsense in that code... it even tests for NULL just after
> dereferencing the thing it is testing.
>
> I fixed it here
>
> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=
> a8268e761905ba5ab65686b378d824c994135266
>
> I don't think you're running HEAD... but the fix is easy to adapt.
>
> -Andy
>
>
>  I would be very grateful if someone fixes this bug.
>>
>>
>> Best Regards,
>> Nikolay Dimitrov
>>
>>
>> _______________________________________________
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20131221/55d0ff34/attachment-0001.html>


More information about the Libwebsockets mailing list