Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
grub2.2117
0001-unix-password-Fix-file-descriptor-leak.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-unix-password-Fix-file-descriptor-leak.patch of Package grub2.2117
From 810254093959708aa6a260c59ad3cf3a1d250755 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko <phcoder@gmail.com> Date: Mon, 26 Jan 2015 09:53:03 +0100 Subject: [PATCH] unix/password: Fix file descriptor leak. Found by: Coverity scan. --- grub-core/osdep/unix/password.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) Index: grub-2.02~beta2/grub-core/osdep/unix/password.c =================================================================== --- grub-2.02~beta2.orig/grub-core/osdep/unix/password.c 2013-12-25 00:29:26.000000000 +0800 +++ grub-2.02~beta2/grub-core/osdep/unix/password.c 2015-09-22 17:10:01.109530851 +0800 @@ -53,7 +53,10 @@ tty_changed = 0; grub_memset (buf, 0, buf_size); if (!fgets (buf, buf_size, stdin)) - return 0; + { + fclose (in); + return 0; + } ptr = buf + strlen (buf) - 1; while (buf <= ptr && (*ptr == '\n' || *ptr == '\r')) *ptr-- = 0; @@ -64,5 +67,7 @@ grub_xputs ("\n"); grub_refresh (); + fclose (in); + return 1; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor