From: Ben Pfaff Date: Tue, 18 Jan 2022 03:19:27 +0000 (-0800) Subject: spv-legacy-decoder: Always give the pivot table a title. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=03384f9680feba65ee79b9680f366435a7a60442 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. --- 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);