From: Ben Pfaff Date: Thu, 16 Oct 2008 03:48:15 +0000 (-0700) Subject: Fix crash in tabulating long-string variables in CROSSTABS. X-Git-Tag: v0.7.1~6^2~5 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9da91f0b58bb3518f2642af932c3a45b63863274;p=pspp-builds.git Fix crash in tabulating long-string variables in CROSSTABS. Fixes bug #24557. --- diff --git a/src/language/stats/crosstabs.q b/src/language/stats/crosstabs.q index 4c5309bf..e16c8dc2 100644 --- a/src/language/stats/crosstabs.q +++ b/src/language/stats/crosstabs.q @@ -1674,7 +1674,7 @@ enum_var_values (struct table_entry **entries, int entry_cnt, int var_idx, if (mode == GENERAL) { - int width = var_get_width (v); + int width = MIN (var_get_width (v), MAX_SHORT_STRING); int i; *values = xnmalloc (entry_cnt, sizeof **values);