Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa committed Jul 9, 2024
1 parent 23b2778 commit a7e04ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
26 changes: 5 additions & 21 deletions libclamav/htmlnorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,27 +683,11 @@ bool html_insert_form_data(const char * const value, form_data_t *tags) {
}

void html_form_data_tag_free(form_data_t *tags) {
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
fprintf(stderr, "%s::%d::UNIMPLEMENTED!!!\n", __FUNCTION__, __LINE__);
// exit(1);
size_t i;
for (i = 0; i < tags->count; i++){
CLI_FREE_AND_SET_NULL(tags->tag[i]);
}
CLI_FREE_AND_SET_NULL(tags->tag);
}

static bool cli_html_normalise(cli_ctx *ctx, int fd, m_area_t *m_area, const char *dirname, tag_arguments_t *hrefs, const struct cli_dconf *dconf, form_data_t * form_data)
Expand Down
2 changes: 1 addition & 1 deletion libclamav/htmlnorm.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct m_area_tag {
} m_area_t;

typedef struct form_data_tag {
unsigned char ** tag;
char ** tag;
size_t count;
} form_data_t;

Expand Down
5 changes: 3 additions & 2 deletions libclamav/scanners.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,6 @@ static bool is_url(const char *const str)
static void save_urls(cli_ctx *ctx, tag_arguments_t *hrefs, form_data_t * form_data)
{
int i = 0;
bool bAdded = false;
json_object *ary = NULL;

if (NULL == hrefs) {
Expand Down Expand Up @@ -2524,7 +2523,7 @@ static void save_urls(cli_ctx *ctx, tag_arguments_t *hrefs, form_data_t * form_d
}

/*Add form_data*/
for (i = 0; i < form_data->count; i++) {
for (i = 0; i < (int) form_data->count; i++) {
if (is_url((const char *)form_data->tag[i])) {
if (NULL == ary){
ary = cli_jsonarray(ctx->wrkproperty, HTML_URLS_JSON_KEY);
Expand Down Expand Up @@ -2554,6 +2553,8 @@ static void save_urls(cli_ctx *ctx, tag_arguments_t *hrefs, form_data_t * form_d
cli_dbgmsg("[cli_scanhtml] Failed to add \"%s\" entry JSON array\n", HTML_URLS_JSON_KEY);
}
#endif


}

static cl_error_t cli_scanhtml(cli_ctx *ctx)
Expand Down

0 comments on commit a7e04ec

Please sign in to comment.