1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

(trunk, libT) allocate in jsonsl, allocate jpr_root using the correct integral type. upstream xref: https://github.com/mnunberg/jsonsl/issues/6

This commit is contained in:
Jordan Lee 2013-12-16 16:32:55 +00:00
parent 3f2549e886
commit 2002253802

View file

@ -869,7 +869,7 @@ void jsonsl_jpr_match_state_init(jsonsl_t jsn,
}
jsn->jprs = malloc(sizeof(jsonsl_jpr_t) * njprs);
jsn->jpr_count = njprs;
jsn->jpr_root = calloc(1, sizeof(int) * njprs * jsn->levels_max);
jsn->jpr_root = calloc(1, sizeof(size_t) * njprs * jsn->levels_max);
memcpy(jsn->jprs, jprs, sizeof(jsonsl_jpr_t) * njprs);
/* Set the initial jump table values */