Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2
lockdev
lockdev-reserve-some-space-to-avoid-buffer-over...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lockdev-reserve-some-space-to-avoid-buffer-overflow.diff of Package lockdev
From 7e31caa61b5f839e7b2c3f4c45dcbba925f37d32 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel <ludwig.nussel@suse.de> Date: Fri, 23 Apr 2010 11:09:29 +0200 Subject: [PATCH 2/2] reserve some space to avoid buffer overflow this should really be handled by the _dl_filename_* functions --- src/lockdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/lockdev.c b/src/lockdev.c index 88305e9..84c0902 100644 --- a/src/lockdev.c +++ b/src/lockdev.c @@ -488,7 +488,7 @@ _dl_check_devname (const char *devname) } if ( strcmp( p, "tty") == 0 ) p = ttyname( 0); /* this terminal, if it exists */ - if (((l = strlen(p)) == 0) || (l > (MAXPATHLEN - strlen(LOCK_PATH)))) + if (((l = strlen(p)) == 0) || (l > (MAXPATHLEN - strlen(LOCK_PATH) - 10))) return NULL; if ((m = malloc(++l)) == NULL) return NULL; -- 1.6.4.2
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