sys-file-reader: Fix double-free on read of partial record.
[pspp-builds.git] / src / data / dictionary.c
index 5f86bbf518fc84822343ab60f45e7483653977dd..0ca9f9e4ff50023543e1914ae83576ebaa27c6a2 100644 (file)
@@ -330,7 +330,7 @@ void
 dict_get_vars (const struct dictionary *d, const struct variable ***vars,
                size_t *cnt, enum dict_class exclude)
 {
-  dict_get_vars_mutable (d, CONST_CAST (struct variable ***, vars), cnt, exclude);
+  dict_get_vars_mutable (d, (struct variable ***) vars, cnt, exclude);
 }
 
 /* Sets *VARS to an array of pointers to variables in D and *CNT
@@ -1262,7 +1262,7 @@ dict_set_documents (struct dictionary *d, const char *documents)
      final line with spaces. */
   remainder = ds_length (&d->documents) % DOC_LINE_LENGTH;
   if (remainder != 0)
-    ds_put_char_multiple (&d->documents, ' ', DOC_LINE_LENGTH - remainder);
+    ds_put_byte_multiple (&d->documents, ' ', DOC_LINE_LENGTH - remainder);
 }
 
 /* Drops the documents from dictionary D. */