]> granicus.if.org Git - transmission/commitdiff
(trunk, libT) allocate in jsonsl, allocate jpr_root using the correct integral type...
authorJordan Lee <jordan@transmissionbt.com>
Mon, 16 Dec 2013 16:32:55 +0000 (16:32 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Mon, 16 Dec 2013 16:32:55 +0000 (16:32 +0000)
libtransmission/jsonsl.c

index e69d39405eb604257df386dcf3ab2cbd92a9df6c..9cebd8c446d386169e034996fea813275532d91e 100644 (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 */