mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-12-14 04:15:25 +08:00
pwck: fix segfault when calling fprintf()
As shadow_logfd variable is not set at the beginning of the program if something fails and fprintf() is called a segmentation fault happens. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2021339 Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
parent
387da46d73
commit
d8e54618fe
@ -857,6 +857,7 @@ int main (int argc, char **argv)
|
||||
* Get my name so that I can use it to report errors.
|
||||
*/
|
||||
Prog = Basename (argv[0]);
|
||||
shadow_logfd = stderr;
|
||||
|
||||
(void) setlocale (LC_ALL, "");
|
||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
|
Loading…
Reference in New Issue
Block a user