Skip to content

Commit

Permalink
[SAS7BCAT reader] fix bounds check
Browse files Browse the repository at this point in the history
Closes #299
Closes #303
  • Loading branch information
evanmiller committed May 4, 2024
1 parent 024bb37 commit 32f64d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sas/readstat_sas7bcat_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static readstat_error_t sas7bcat_parse_value_labels(const char *value_start, siz

/* Pass 1 -- find out the offset of the labels */
for (i=0; i<label_count_capacity; i++) {
if (&lbp1[3] - value_start > value_labels_len || sas_read2(&lbp1[2], ctx->bswap) < 0) {
if (&lbp1[4] - value_start > value_labels_len || sas_read2(&lbp1[2], ctx->bswap) < 0) {
retval = READSTAT_ERROR_PARSE;
goto cleanup;
}
Expand Down

0 comments on commit 32f64d3

Please sign in to comment.