Skip to content

Commit

Permalink
Fail early on bad MR string
Browse files Browse the repository at this point in the history
  • Loading branch information
slobodan-ilic committed Jun 14, 2024
1 parent 7211183 commit 7cc0ef8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/spss/readstat_sav_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ static readstat_error_t sav_read_multiple_response_sets(size_t data_len, sav_ctx
retval = READSTAT_ERROR_PARSE;
goto cleanup;
}
if (mr_string[0] != '$') {
retval = READSTAT_ERROR_BAD_MR_STRING;
goto cleanup;
}

char *token = strtok(mr_string, "$\n");
int num_lines = 0;
Expand Down

0 comments on commit 7cc0ef8

Please sign in to comment.