[PATCH] regedit: fixed a fclose(stdin) issue (Coverity)
meissner at suse.de
Sat Nov 17 14:28:31 CST 2012
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.
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
@@ -143,6 +143,7 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
if (strcmp(filename, "-") == 0)
reg_file = stdin;
+ realname = NULL;
More information about the wine-patches