mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-05-03 13:12:59 -04:00
fix crash in clamd scan callback function.
This commit is contained in:
@@ -82,6 +82,7 @@ static int onas_fan_scanfile(int fan_fd, const char *fname, struct fanotify_even
|
||||
res.response = FAN_ALLOW;
|
||||
context.filename = fname;
|
||||
context.virsize = 0;
|
||||
context.scandata = NULL;
|
||||
if(scan && cl_scandesc_callback(fmd->fd, &virname, NULL, tharg->engine, tharg->options, &context) == CL_VIRUS) {
|
||||
if(extinfo && context.virsize)
|
||||
logg("ScanOnAccess: %s: %s(%s:%llu) FOUND\n", fname, virname, context.virhash, context.virsize);
|
||||
@@ -342,6 +343,7 @@ static int cauth_scanfile(const char *fname, int extinfo, struct thrarg *tharg)
|
||||
|
||||
context.filename = fname;
|
||||
context.virsize = 0;
|
||||
context.scandata = NULL;
|
||||
|
||||
fd = open(fname, O_RDONLY);
|
||||
if(fd == -1)
|
||||
|
||||
Reference in New Issue
Block a user