Projects
Mega:24.09
audit
_service:tar_scm:backport-last-part-of-NULL-poi...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-last-part-of-NULL-pointer-checks.patch of Package audit
From 97f3c78b6b31126c1128927d9c85bb794a1efa17 Mon Sep 17 00:00:00 2001 From: Yugend <jugendd@mail.ru> Date: Fri, 15 Mar 2024 18:13:36 +0300 Subject: [PATCH] last part of NULL pointer checks Conflict:NA Reference:https://github.com/linux-audit/audit-userspace/commit/97f3c78b6b31126c1128927d9c85bb794a1efa17 --- auparse/interpret.c | 3 +++ src/ausearch-lookup.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/auparse/interpret.c b/auparse/interpret.c index 12ae35e2..f6f39449 100644 --- a/auparse/interpret.c +++ b/auparse/interpret.c @@ -420,6 +420,9 @@ int load_interpretation_list(const char *buffer) il.cnt = 0; il.record = buf = strdup(buffer); + if (buf == NULL) { + goto err_out; + } if (strncmp(buf, "SADDR=", 6) == 0) { // We have SOCKADDR record. It has no other values. // Handle it by itself. diff --git a/src/ausearch-lookup.c b/src/ausearch-lookup.c index bdcd7aaf..86239f39 100644 --- a/src/ausearch-lookup.c +++ b/src/ausearch-lookup.c @@ -302,6 +302,10 @@ char *unescape(const char *buf) return NULL; str = strndup(buf, ptr - buf); + if (str == NULL) { + fprintf(stderr, "Memory alocation error"); + return NULL; + } if (*buf == '(') return str; -- 2.33.0
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
.
浙ICP备2022010568号-2