Skip to content

Commit

Permalink
implement trendmicro#111
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaddat committed Sep 23, 2022
1 parent 41b0c7f commit afdf462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input_desc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int read_file_eval_tlsh_splitline(char *fname, struct InputDescr *inputd,
// 2. read the file
///////////////////////////////////////
char *x;
char linebuf[2048];
char linebuf[2048]{};

fd = fopen(fname, "r");
if (fd==NULL) {
Expand Down Expand Up @@ -152,7 +152,7 @@ struct FileName *r2;
// printf("compare %s %s\n", r1->name, r2->name);
return (strcmp(r1->full_fname, r2->full_fname));
}

__attribute__((visibility("default")))
int set_input_desc(char *dirname, char *listname, int listname_col, int listname_csv,
char *fname, char *digestname, int show_details, int fc_cons_option, char *splitlines, struct InputDescr *inputd, int showvers)
{
Expand Down
3 changes: 3 additions & 0 deletions src/shared_file_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ size_t buf_offset = 0;
}
}

__attribute__((visibility("default")))
const char *convert_special_chars(char *filename, char *buf, size_t bufSize, int output_json)
{
int len = strlen(filename);
Expand Down Expand Up @@ -181,6 +182,7 @@ const char *convert_special_chars(char *filename, char *buf, size_t bufSize, int
}

////////////////////////////////////////////////////////////////////////////////
__attribute__((visibility("default")))

int read_file_eval_tlsh(char *fname, Tlsh *th, int show_details, int fc_cons_option, int showvers)
{
Expand Down Expand Up @@ -402,6 +404,7 @@ int read_files_from_dir(char *dirname, struct FileName *fnames, int max_fnames,
return(err);
}

__attribute__((visibility("default")))
void freeFileName(struct FileName *fnames, int count)
{
for (int i=0; i<count; i++) {
Expand Down

0 comments on commit afdf462

Please sign in to comment.