1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 04:13:14 +02:00
Files
unrealircd/src
Bram Matthys 58db5b0845 Fix crash in JSON-RPC. Reported by multiple people past few days,
including Lord255, armyn and others.
The issue was not there when running with ASan, which is why it
was non-reproducible for so long. Valgrind picked it up correctly.

The bug was that in rpc_response() and rpc_error() I do:
id = json_object_get(request, "id");
[..]
json_object_set_new(j, "id", id);

which is wrong, since json_object_get() "borrows the reference"
and json_object_set_new "steals the reference".
In this particular case it should be:
json_object_set(j, "id", id);

Fixed in both functions. Would have to audit the code if the mistake
is made elsewhere too though. On first sight, it seems not.
2023-01-14 10:36:54 +01:00
..
2022-12-14 15:24:19 +00:00
2023-01-07 18:15:11 +01:00
2021-08-18 13:08:42 +02:00
2021-08-18 13:08:42 +02:00
2022-06-19 13:13:33 +00:00
2023-01-11 16:54:22 +01:00
2021-09-11 09:56:22 +02:00
2022-12-14 15:24:19 +00:00
2022-12-14 15:24:19 +00:00
2022-12-14 15:24:19 +00:00
2023-01-07 18:15:11 +01:00