[PATCH] use fstat, handle errors
Marcus Meissner
meissner at suse.de
Tue Feb 13 06:25:34 CST 2007
---
tools/bin2res.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/bin2res.c b/tools/bin2res.c
index 3ccabb0..9be7198 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -149,7 +149,10 @@ static int process_resources(const char*
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)
--
1.4.3.4
More information about the wine-patches
mailing list