jsn->jpr_root is allocated using the wrong type #6

Closed
jordanl opened this Issue Dec 16, 2013 · 1 comment

Projects

None yet

2 participants

@jordanl
jordanl commented Dec 16, 2013

Reported by Transmission user dhill in downstream ticket: https://trac.transmissionbt.com/ticket/5556

In jsonsl_jpr_match_state_init(), jpr_root is type size_t, but is allocated using sizeof(int).

The line should read:

jsn->jpr_root = calloc(1, sizeof(size_t) * njprs * jsn->levels_max);

@janaz janaz pushed a commit to janaz/transmissionbt that referenced this issue Dec 16, 2013
jordan (trunk, libT) allocate in jsonsl, allocate jpr_root using the correct…
… integral type. upstream xref: mnunberg/jsonsl#6

git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14216 f4695dd4-2c0a-0410-b89c-da849a56a58e
58f77be
@mnunberg
Owner

Thanks for the bug report.

You can submit a pull request for this, or I can change it myself - which one do you prefer?

@mnunberg mnunberg closed this Feb 8, 2014
@wereHamster wereHamster pushed a commit to wereHamster/transmission that referenced this issue Feb 15, 2014
jordan (trunk, libT) allocate in jsonsl, allocate jpr_root using the correct…
… integral type. upstream xref: mnunberg/jsonsl#6

git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14216 f4695dd4-2c0a-0410-b89c-da849a56a58e
d68acff
@uranix uranix pushed a commit to uranix/transmission that referenced this issue Nov 16, 2014
jordan (trunk, libT) allocate in jsonsl, allocate jpr_root using the correct…
… integral type. upstream xref: mnunberg/jsonsl#6
ecb5fc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment