Skip to content

Commit

Permalink
Add asserts that the range to dump is valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Sep 27, 2020
1 parent 1c120b0 commit 0e22969
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/stores/sqStoreDumpMetaData.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ enum dumpType {

void
dumpLibs(sqStore *seq, uint32 bgnID, uint32 endID) {
uint32 lastLib = seq->sqStore_lastLibraryID();

assert(bgnID >= 1);
assert(bgnID <= lastLib);

assert(endID >= 1);
assert(endID <= lastLib);

fprintf(stdout, "ID technology name\n");
fprintf(stdout, "---- ---------------- ------------------------------\n");
Expand Down Expand Up @@ -168,6 +175,14 @@ dumpReads_setFlagsString(sqStore *seqs, uint32 rid, char *flags) {

void
dumpReads(sqStore *seqs, uint32 bgnID, uint32 endID, sqRead_which w, bool showAll) {
uint32 lastRead = seqs->sqStore_lastReadID();

assert(bgnID >= 1);
assert(bgnID <= lastRead);

assert(endID >= 1);
assert(endID <= lastRead);

char l1[1024] = {0};

char s1len[16] = {0}, s1bgn[16] = {0}, s1end[16] = {0};
Expand Down

0 comments on commit 0e22969

Please sign in to comment.