We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyBigWig/libBigWig/bwValues.c
Line 36 in 339ebc8
A new root node is allocated here using malloc (not calloc), which leaves node->root uninitialized.
Line 302 in 339ebc8
Here the index is read.
Line 308 in 339ebc8
And here the RTree is parsed only if idx->root is not zero, assuming that it was initialized to zero by readRTreeIdx, which is not the case.
Possible fix:
--- a/libBigWig/bwValues.c +++ b/libBigWig/bwValues.c @@ -35,6 +35,7 @@ static bwRTree_t *readRTreeIdx(bigWigFile_t *fp, uint64_t offset) { node = malloc(sizeof(bwRTree_t)); if(!node) return NULL; + node->root = 0; if(bwRead(&(node->blockSize), sizeof(uint32_t), 1, fp) != 1) goto error; if(bwRead(&(node->nItems), sizeof(uint64_t), 1, fp) != 1) goto error;
The text was updated successfully, but these errors were encountered:
Good catch, I'll change that to calloc.
calloc
Sorry, something went wrong.
9e2925a
Merge pull request #86 from deeptools/fix85
3ee292c
Fix #85
I'll push out a version with this fixed now.
No branches or pull requests
pyBigWig/libBigWig/bwValues.c
Line 36 in 339ebc8
A new root node is allocated here using malloc (not calloc), which leaves node->root uninitialized.
pyBigWig/libBigWig/bwValues.c
Line 302 in 339ebc8
Here the index is read.
pyBigWig/libBigWig/bwValues.c
Line 308 in 339ebc8
And here the RTree is parsed only if idx->root is not zero, assuming that it was initialized to zero by readRTreeIdx, which is not the case.
Possible fix:
The text was updated successfully, but these errors were encountered: