Fix SM-serialization testcase
`xmpp_run_once()` uses `FD_SET()` to determine which sockets to `select()` on. The socket gets initialized to `INVALID_SOCKET = -1` inside `xmpp_conn_new()` which leads to a buffer overflow once `FD_SET()` is called. This is only exposed when enabling a higher optimization level, which was only done in the `release-test` CI job. * Fix this testcase by initializing the socket to a possible value. * Build the Valgrind CI jobs with `-O2`. * Make the output of the `release-test` more verbose. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -147,6 +147,7 @@ int main()
|
||||
conn->intf = intf;
|
||||
state = conn->state;
|
||||
conn->state = XMPP_STATE_CONNECTED;
|
||||
conn->sock = 123;
|
||||
|
||||
xmpp_send_raw(conn, "foo", 3);
|
||||
ENSURE_EQ(xmpp_conn_send_queue_len(conn), 1);
|
||||
|
||||
Reference in New Issue
Block a user