| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Unlike json_parser_load_from_data(), g_strndup() will not handle signed
sizes that are negative. This causes the size to overflow to a really
large value, and in turn lead to a segmentation fault.
The solution is simple: calculate the size of the data when the given
size is negative.
This bug was introduced by 0121bae.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older glib versions didn't consider "$" to be a valid expression, and
threw this error:
Root node followed by invalid character '
(That's supposed to be '%c' with a \0)
Since this is possibly the simplest expression to parse, a g_strcmp0()
can do the job.
Thanks to advcomp2019 for reporting this bug and finding a test case
where this issue is reproducible every time (receiving events of people
joining or leaving in a groupchat)
Also thanks to EionRobb who realized what the bug was three hours ago
(and I didn't listen because I thought the previous bug was the same)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older json-glib versions had a bug[1] in which the length parameter was
ignored and this error happened if the input was not null-terminated:
JSON data must be UTF-8 encoded
Since these versions are expected to still be around in some distros,
this commit makes a copy with g_strndup() to ensure that it's always
null terminated.
Thanks to advcomp2019 for reporting this bug and finding a test case
where this issue is reproducible every time (receiving events of people
joining or leaving in a groupchat)
[1]: https://bugzilla.gnome.org/show_bug.cgi?id=727755
|
| |
|
|
|
|
|
| |
Just for debugging purposes with users who don't run this with debug
enabled.
|
| |
|
|
|
|
|
|
|
|
| |
Fixes issues such as losing messages that include a quote character.
Only escapes the minimum needed to work - control characters,
backslashes and quotes. UTF-8 chars are still valid json, so they are
sent as-is.
|
|
|