Marcus Meissner : bin2res: Use fstat, handle errors.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 14 09:25:56 CST 2007
Module: wine
Branch: master
Commit: da7c2f5f3621ce93cb50c014eb7eda20c6e2ea7a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da7c2f5f3621ce93cb50c014eb7eda20c6e2ea7a
Author: Marcus Meissner <meissner at suse.de>
Date: Tue Feb 13 13:25:34 2007 +0100
bin2res: Use fstat, handle errors.
---
tools/bin2res.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/bin2res.c b/tools/bin2res.c
index 3ccabb0..d52aebc 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -149,7 +149,10 @@ static int process_resources(const char* input_file_name, const char* specific_f
int fd, c;
if (!(fin = fopen(input_file_name, "r"))) return 0;
- if (stat(input_file_name, &st) < 0) return 0;
+ if (fstat(fileno(fin), &st) < 0) {
+ fclose (fin);
+ return 0;
+ }
rc_last_update = st.st_mtime;
if (inserting)
More information about the wine-cvs
mailing list