From 1b68ed6c9e7c1db0d3614d0159fb21db55554f3a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 27 Sep 2013 14:21:08 +0200 Subject: [PATCH] Use correct argument order for pool_nmalloc. This function (and other calloc-like functions) are may not take zero as the size argument. Hence the order is important. Reported by Przemek Powalko --- src/data/sys-file-reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 5b654a1c05..681e6f531b 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -1747,7 +1747,7 @@ parse_value_labels (struct sfm_reader *r, struct dictionary *dict, char **utf8_labels; size_t i; - utf8_labels = pool_nmalloc (r->pool, sizeof *utf8_labels, record->n_labels); + utf8_labels = pool_nmalloc (r->pool, record->n_labels, sizeof *utf8_labels); for (i = 0; i < record->n_labels; i++) utf8_labels[i] = recode_string_pool ("UTF-8", dict_get_encoding (dict), record->labels[i].label, -1, -- 2.30.2