diff options
| author | jgeboski <jgeboski@gmail.com> | 2015-12-20 20:26:24 -0500 |
|---|---|---|
| committer | jgeboski <jgeboski@gmail.com> | 2015-12-20 20:26:24 -0500 |
| commit | 28ec26e7ca9b1909c65939cea7f55fc72c55ed9c (patch) | |
| tree | c4a5345d6990f46cd437aff235e26bc200538d0f /facebook/facebook-util.c | |
| parent | 00c0ae832b2f04969d205b951ae37b9bc884b84f (diff) | |
| download | bitlbee-facebook-28ec26e7ca9b1909c65939cea7f55fc72c55ed9c.tar.gz bitlbee-facebook-28ec26e7ca9b1909c65939cea7f55fc72c55ed9c.tar.bz2 bitlbee-facebook-28ec26e7ca9b1909c65939cea7f55fc72c55ed9c.tar.xz | |
facebook-json: fixed a size overflow with string duplication
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.
Diffstat (limited to 'facebook/facebook-util.c')
0 files changed, 0 insertions, 0 deletions
