Added sanity check against bad people and/or crazy big indels at edges of ref context

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3918 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-08-03 05:37:17 +00:00
parent 5f1b67c1de
commit a7ff9caf54
1 changed files with 1 additions and 1 deletions

View File

@ -767,7 +767,7 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
// create a Consensus from just the indel string that falls on the reference
private Consensus createAlternateConsensus(final int indexOnRef, final byte[] reference, final byte[] indelStr, final boolean isDeletion) {
if ( indexOnRef < 0 )
if ( indexOnRef < 0 || indexOnRef >= reference.length )
return null;
// create the new consensus