X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fpspp-dump-sav.c;h=c194f230500fbdf7c5c52d7a6778651e8f412ae6;hb=a016af53bdf60d1ab95e680e6b31311b21518b75;hp=879c3748d3de9b78bf9505b9f8a526883df58d7b;hpb=bdf3609794a1f7bea432415f7466b85a069f8b0c;p=pspp diff --git a/utilities/pspp-dump-sav.c b/utilities/pspp-dump-sav.c index 879c3748d3..c194f23050 100644 --- a/utilities/pspp-dump-sav.c +++ b/utilities/pspp-dump-sav.c @@ -444,18 +444,16 @@ read_variable_record (struct sfm_reader *r) if (has_variable_label == 1) { long long int offset = ftello (r->file); - size_t len, read_len; - char label[255 + 1]; + size_t len; + char *label; len = read_int (r); /* Read up to 255 bytes of label. */ - read_len = MIN (sizeof label - 1, len); - read_string (r, label, read_len + 1); + label = xmalloc (len + 1); + read_string (r, label, len + 1); printf("\t%08llx Variable label: \"%s\"\n", offset, label); - - /* Skip unread label bytes. */ - skip_bytes (r, len - read_len); + free (label); /* Skip label padding up to multiple of 4 bytes. */ skip_bytes (r, ROUND_UP (len, 4) - len); @@ -606,12 +604,6 @@ read_extension_record (struct sfm_reader *r) read_machine_float_info (r, size, count); return; - case 5: - /* Variable sets information. We don't use these yet. - They only apply to GUIs; see VARSETS on the APPLY - DICTIONARY command in SPSS documentation. */ - break; - case 6: /* DATE variable information. We don't use it yet, but we should. */