1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Files
wmaker/WINGs/findfile.c
Christophe CURIS 155e1f1fe1 WUtil: rewrote wcopy_file for better error handling and to fix Coverity #50234
The original code used the libc "fopen" kind of operation, which are handy
when manipulating text files, but:
 - bring an overhead for binary files that we don't need here;
 - does not provide the mechanisms for safe error handling and special cases

As Coverity reported a Time-of-Check/Time-of-Use type of security issue,
took the opportunity to fix it and increased the size of the buffer used
for data to allow better use of modern disk performances.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:42:18 +00:00

12 KiB