From 6a043145ca6e9c55184013841a67b2fef87e44c0 Mon Sep 17 00:00:00 2001
Subject: [PATCH] Remove offset pointer optimization in inftrees.c.
inftrees.c was subtracting an offset from a pointer to an array,
in order to provide a pointer that allowed indexing starting at
the offset. This is not compliant with the C standard, for which
the behavior of a pointer decremented before its allocated memory
is undefined. Per the recommendation of a security audit of the
zlib code by Trail of Bits and TrustInSoft, in support of the
Mozilla Foundation, this tiny optimization was removed, in order
to avoid the possibility of undefined behavior.
Since eg, 1e-3 is a float without needing a decimal point, let's just
generally take it that anything with the exponent token is a float, ie, 1e3
is also a float despite it can be expressed as an integer.
This seems right also because E is itself not valid in an integer.
https://github.com/warmcat/libwebsockets/issues/3308
We allow a default 0 length in the incoming const info to mean a default
size (of 512). We implement it by copying the incoming const info to a
copy in the spa that we can adapt, which is all good.
But in two cases after we dumbly use the incoming const info directly
instead of the adapted copy.
https://github.com/warmcat/libwebsockets/issues/3294
Increase polling time and poll the "order" endpoint instead of the "finalize" endpoint. These changes are required for ACME to work with Let's Encrypt as of 2024.
When using multiple client contextes in a single application, rops_pt_init_destroy_netlink() fails binding the second socket and on - only the first one succeeds. The failure is made obvious by this log:
W: rops_pt_init_destroy_netlink: netlink bind failed
So, let's fix this by doing what netlink(7) man page suggests:
If the application sets nl_pid before calling bind(2), then it is up to the
application to make sure that nl_pid is unique. If the application sets it
to 0, the kernel takes care of assigning it. The kernel assigns the process
ID to the first netlink socket the process opens and assigns a unique nl_pid
to every netlink socket that the process subsequently creates.
When other roles like ws reading data, they follow `rx_buffer_size`, then fallback to context's `pt_serv_buf_size`.
However, `raw-skt` don't follow `rx_buffer_size`, always use 0, then fallback to `pt_serv_buf_size`.
This PR make `raw-skt` don't read more than `rx_buffer_size` data.