Files
clamav/libclamav/bytecode_api.c
Micah Snyder d9c8cab5be Windows: Fix utf8 filepath issues
* Windows: Fix utf8 filename support issue

The function used to verify the real path for the file being
scanned fails on some utf8 filenames, like:
  file_with_ümlaut.eicar.com

The scan continues despite the failure, but the error reported from
clamd and warnings from clamscan are confusing because it looks like
the scan failed even if a verdict shows up later.

The fix here is to convert the path from utf8 to utf16 and then use
the CreateFileW() API to grab the file handle for the real path check.

Resolves: https://github.com/Cisco-Talos/clamav/issues/418
Resolves: CLAM-1782

* Windows: Fix utf8 libclamav logging issues

Print to the log using rust eprint() instead of fputs()

Rust's eprint() function supports full utf8, while fputs() gets
confused and prints stuff like:
  file_with_├╝mlaut.eicar.com
instead of:
  file_with_ümlaut.eicar.com
2022-04-30 19:11:03 -07:00

70 KiB