Projects
openEuler:20.03:LTS:SP3
audit
_service:tar_scm_kernel_repo:backport-Fix-an-au...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm_kernel_repo:backport-Fix-an-auparse-memory-leak-caused-in-recent-glibc.patch of Package audit
From 16246878c503d7395ae668817bf629e05361fec5 Mon Sep 17 00:00:00 2001 From: Steve Grubb <sgrubb@redhat.com> Date: Thu, 29 Jul 2021 18:39:22 -0400 Subject: [PATCH] Fix an auparse memory leak caused in recent glibc --- auparse/interpret.c | 4 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff --git a/auparse/interpret.c b/auparse/interpret.c index 2813acb..33c173e 100644 --- a/auparse/interpret.c +++ b/auparse/interpret.c @@ -50,6 +50,7 @@ #include <sys/personality.h> #include <sys/prctl.h> #include <sched.h> +#include <limits.h> /* PATH_MAX */ #ifdef USE_FANOTIFY #include <linux/fanotify.h> #else @@ -865,8 +866,10 @@ static const char *print_escaped_ext(const idata *id) str1 = NULL; } errno = 0; - out = realpath(str3, NULL); + out = malloc(PATH_MAX); + realpath(str3, out); if (errno) { // If there's an error, just return the original + free(out); free(str1); free(str2); return str3; --
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.