Skip to content

fix to use proper offset in faidx allocidx#2147

Merged
daviesrob merged 1 commit into
samtools:developfrom
vasudeva8:allocidx
Nov 20, 2024
Merged

fix to use proper offset in faidx allocidx#2147
daviesrob merged 1 commit into
samtools:developfrom
vasudeva8:allocidx

Conversation

@vasudeva8

Copy link
Copy Markdown
Contributor

Fixes #2142

The memset in allocidx uses a pointer to struct but offset was used as if it was a pointer to a byte.
This should have updated incorrect addresses and caused this issue.

This change corrects the offset usage. Checked with bigger files where reallocation occurs and no corruptions observed.

@daviesrob daviesrob merged commit 9e91173 into samtools:develop Nov 20, 2024
@vasudeva8 vasudeva8 deleted the allocidx branch November 20, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

faidx --write-index invalid free with process substitution regions

2 participants