From 5544f503bf0fcfd050b4e338e8ec7b22e2f53b9a Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Fri, 2 May 2014 15:13:29 +0000 Subject: Big cleanup in functions writing to a char buffer without proper size boundary. --- src/htsjava.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/htsjava.c') diff --git a/src/htsjava.c b/src/htsjava.c index 20faeee..0098994 100644 --- a/src/htsjava.c +++ b/src/htsjava.c @@ -172,7 +172,7 @@ static int hts_parse_java(t_hts_callbackarg * carg, httrackp * opt, #if JAVADEBUG printf("fopen\n"); #endif - if ((fpout = FOPEN(fconv(catbuff, file), "r+b")) == NULL) { + if ((fpout = FOPEN(fconv(catbuff, sizeof(catbuff), file), "r+b")) == NULL) { //fprintf(stderr, "Cannot open input file.\n"); sprintf(str->err_msg, "Unable to open file %s", file); return 0; // une erreur.. @@ -477,7 +477,7 @@ static int tris(httrackp * opt, char *buffer) { if (strnotempty(type)) // type reconnu! return 1; // ajout RX 05/2001 - else if (is_dyntype(get_ext(catbuff, buffer))) // asp,cgi... + else if (is_dyntype(get_ext(catbuff, sizeof(catbuff), buffer))) // asp,cgi... return 1; } return 0; -- cgit v1.2.3