Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
patch.6939
fix-out-of-bounds-access.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-out-of-bounds-access.patch of Package patch.6939
From: Hanno Boeck <hanno@gentoo.org> Date: Wed, 10 Aug 2016 00:06:41 +0200 Subject: Fix out-of-bounds access to lines in a patch Patch-mainline: v2.7.5 Git-commit: a0d7fe4589651c64bd16ddaaa634030bb0455866 References: bsc#1080918, CVE-2016-10713 This bug can trigger with malformed patches. * src/pch.c (pch_write_line): Avoid out-of-bounds access to p_line[line][p_len[line] - 1] when p_len[line] is 0. --- src/pch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/src/pch.c +++ b/src/pch.c @@ -2275,7 +2275,7 @@ pfetch (lin line) bool pch_write_line (lin line, FILE *file) { - bool after_newline = p_line[line][p_len[line] - 1] == '\n'; + bool after_newline = (p_len[line] > 0) && (p_line[line][p_len[line] - 1] == '\n'); if (! fwrite (p_line[line], sizeof (*p_line[line]), p_len[line], file)) write_fatal (); return after_newline;
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