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

"Andy Green (林安廸)" andy at warmcat.com
Sat Dec 21 03:27:06 CET 2013

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


I don't think you're running HEAD... but the fix is easy to adapt.


> 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

More information about the Libwebsockets mailing list