From 947e6378c28a6a33a2cd9ef4c4d90e001bdcc359 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 17 Jan 2022 19:19:27 -0800 Subject: [PATCH] spv-legacy-decoder: Always give the pivot table a title. A pivot table must have a title. Some parts of PSPP rely on that. The legacy SPV decoder didn't ensure this, and one SPV in my corpus didn't have one, which led to null pointer dereferences, so this commit fixes the problem. --- src/output/spv/spv-legacy-decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/spv/spv-legacy-decoder.c b/src/output/spv/spv-legacy-decoder.c index 94d05b59f2..e103dd842e 100644 --- a/src/output/spv/spv-legacy-decoder.c +++ b/src/output/spv/spv-legacy-decoder.c @@ -1771,7 +1771,8 @@ decode_spvdx_table (const struct spvdx_visualization *v, const char *subtype, const struct pivot_table_look *look, const struct spv_data *data, struct pivot_table **outp) { - struct pivot_table *table = pivot_table_create__ (NULL, subtype); + struct pivot_table *table = pivot_table_create__ ( + pivot_value_new_user_text (v->name, SIZE_MAX), subtype); pivot_table_set_look (table, look); table->look = pivot_table_look_unshare (table->look); -- 2.30.2