[Libwebsockets] [libwebsockets] bad index, overflow protection of lws_lookup (#40)

"Andy Green (林安廸)" andy at warmcat.com
Sat Jan 11 06:15:34 CET 2014


On 10/01/14 03:56, the mail apparently from Simon included:
> context->lws_lookup allocation size is
> (sizeof(struct libwebsocket *) * context->max_fds).
> The maximum index is (context->max_fds - 1).
> context->max_fds is not a valid index.

Thanks... pushed here

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=f162492cf389d9680ecacfd951921607e0899679

-Andy

> ------------------------------------------------------------------------
>
>
>         You can merge this Pull Request by running
>
>    git pull https://github.com/nononame/libwebsockets master
>
> Or view, comment on, or merge it at:
>
> https://github.com/warmcat/libwebsockets/pull/40
>
>
>         Commit Summary
>
>   * bad index overflow protection of lws_lookup
>
>
>         File Changes
>
>   * *M* lib/libwebsockets.c
>     <https://github.com/warmcat/libwebsockets/pull/40/files#diff-0> (2)
>
>
>         Patch Links:
>
>   * https://github.com/warmcat/libwebsockets/pull/40.patch
>   * https://github.com/warmcat/libwebsockets/pull/40.diff
>
>> Reply to this email directly or view it on GitHub
> <https://github.com/warmcat/libwebsockets/pull/40>.
>




More information about the Libwebsockets mailing list