libwebsockets < 4.0.21 includes bad assert on return value of SSL_get_error

Bug #1995744 reported by Michael Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libwebsockets (Ubuntu)
New
Undecided
Unassigned

Bug Description

using libwebsockets 4.0.20, the backtrace shows assertion here:
int lws_ssl_get_error(struct lws *wsi, int n)
{
    int m;

    if (!wsi->tls.ssl)
        return 99;

    m = SSL_get_error(wsi->tls.ssl, n);
    lwsl_debug("%s: %p %d -> %d (errno %d)\n", __func__, wsi->tls.ssl, n, m,
           errno);

    assert (errno != 9);

    return m;
}
here is same function in 4.0.21
int lws_ssl_get_error(struct lws *wsi, int n)
{
    int m;

    if (!wsi->tls.ssl)
        return 99;

    m = SSL_get_error(wsi->tls.ssl, n);
    lwsl_debug("%s: %p %d -> %d (errno %d)\n", __func__, wsi->tls.ssl, n, m,
           errno);

    return m;
}

further https://github.com/warmcat/libwebsockets/issues/2007

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.