Skip to content

Commit

Permalink
Patched ".gz" extension management when -d @ action_create_index()
Browse files Browse the repository at this point in the history
  • Loading branch information
circulosmeos committed Sep 27, 2021
1 parent 0e183c1 commit 74d9152
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gztool.c
Original file line number Diff line number Diff line change
Expand Up @@ -4281,8 +4281,8 @@ local int action_create_index(
if ( indx_n_extraction_opts == DECOMPRESS ) {
// file must have ".gz" extension so it can be decompressed
if ( strlen( file_name ) > 3 && // avoid out-of-bounds
(char *)strstr(file_name, ".gz") ==
(char *)(file_name + strlen(file_name) - 3)
0 == strcmp( ".gz",
(char *)(file_name + strlen(file_name) - 3) )
) {
// if gzip-file name is 'FILE.gz', output file name will be 'FILE'
char *output_filename = malloc( strlen(file_name) );
Expand Down

0 comments on commit 74d9152

Please sign in to comment.