[PATCH] regedit: fixed a fclose(stdin) issue (Coverity)
Marcus Meissner
meissner at suse.de
Sat Nov 17 14:28:31 CST 2012
Hi,
If we have multiple filenames on the commandline, and the second one is -,
we would fclose(stdin) as realname is not NULL.
(And also double free realname.)
So set it back to NULL after free and in the stdin case.
Ciao, Marcus
---
programs/regedit/regedit.c | 1 +
1 Datei geändert, 1 Zeile hinzugefügt(+)
diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
index acff701..b6f74ee 100644
--- a/programs/regedit/regedit.c
+++ b/programs/regedit/regedit.c
@@ -143,6 +143,7 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
if (strcmp(filename, "-") == 0)
{
reg_file = stdin;
+ realname = NULL;
}
else
{
--
1.7.10.4
More information about the wine-patches
mailing list