Skip to content

Commit

Permalink
Merge tag '1.13.12' into dev
Browse files Browse the repository at this point in the history
* Correct bad malloc on sscanf.

Conflicts:
	CHANGES.md
  • Loading branch information
David Jones committed Feb 25, 2019
2 parents be47341 + 01cea4d commit 2638e31
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

* Making species and assembly required commandline arguments in the estep

## 1.13.12

* Correct bad malloc on sscanf.

## 1.13.11

* Modify `fai_access_get_count_length_all_contigs` to use `strtok` rather than sscanf.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CAVEMAN_VERSION=1.13.11
CAVEMAN_VERSION=1.13.12

TEST_REF?=""
#Compiler
Expand Down
2 changes: 1 addition & 1 deletion src/cn_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int cn_access_populate_cn(char *file_loc,uint8_t is_normal){
char rd[250];
while(fgets(rd, 250, cn_file) != NULL){
check(rd != NULL,"Invalid line read in ignored region file.");
char *chr_nom = malloc(sizeof(char *));
char *chr_nom = malloc(sizeof(char) * 250);
int beg,end;
int chk = sscanf(rd,"%s\t%d\t%d\t%d",chr_nom,&beg,&end,&cop);
check(chk == 4,"Incorrect line parsed from copy number file.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/ignore_reg_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int ignore_reg_access_get_ign_reg_for_chr(char *ign_file,char *chr, int entry_co
char rd[200];
while(fgets(rd, 200, file) != NULL){
check(rd != NULL,"Invalid line read in ignored region file.");
char *chr_nom = malloc(sizeof(char)*50);
char *chr_nom = malloc(sizeof(char)*250);
check_mem(chr_nom);
int beg,end;
int chk = sscanf(rd,"%s\t%d\t%d",chr_nom,&beg,&end);
Expand Down
2 changes: 1 addition & 1 deletion src/split_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ List *split_access_get_all_split_sections(char *file_loc){

while ( fgets(line,sizeof(line),file) != NULL ){
i++;
chr = malloc(sizeof(char) * 50);
chr = malloc(sizeof(char) * 250);
check_mem(chr);
int start_zero_based = 0;
int stop = 0;
Expand Down

0 comments on commit 2638e31

Please sign in to comment.