Skip to content

Commit

Permalink
Check out-of-bound memory access, adds to b29c54c
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed Dec 3, 2024
1 parent d98d58f commit b482b77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion csq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,9 @@ fprintf(stderr,"splice_csq_del: %s>%s .. ex=%d,%d beg,end=%d,%d tbeg,tend=%d,%
{
if ( splice->check_donor && splice->tr->strand==STRAND_REV ) splice->csq |= CSQ_SPLICE_DONOR;
if ( splice->check_acceptor && splice->tr->strand==STRAND_FWD ) splice->csq |= CSQ_SPLICE_ACCEPTOR;
if ( ref && alt && !strncmp(ref+N_SPLICE_REGION_INTRON-N_SPLICE_DONOR,alt+N_SPLICE_REGION_INTRON-N_SPLICE_DONOR,N_SPLICE_DONOR) ) splice->csq |= CSQ_SYNONYMOUS_VARIANT;

int noff = N_SPLICE_REGION_INTRON - N_SPLICE_DONOR;
if ( ref && alt && noff<splice->kref.l && noff<splice->kalt.l && !strncmp(ref+noff,alt+noff,N_SPLICE_DONOR) ) splice->csq |= CSQ_SYNONYMOUS_VARIANT;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/csq/ENSCAFT00000047742/test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
104 CA C synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding
104 CA C synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding
104 CA C splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding
104 CA C splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding

2 changes: 1 addition & 1 deletion test/csq/ENSCAFT00000047742/test.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
##INFO=<ID=EXP,Number=1,Type=String,Description="Expected consequence">
##INFO=<ID=EXPL,Number=1,Type=String,Description="Expected consequence with bt/csq -l">
#CHROM POS ID REF ALT QUAL FILTER INFO
chr9 104 . CA C . PASS EXP=synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding
chr9 104 . CA C . PASS EXP=splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding

0 comments on commit b482b77

Please sign in to comment.