Projects
Mega:24.09
audit
_service:tar_scm:backport-avoiding-of-NULL-poin...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-avoiding-of-NULL-pointers-dereference-366.patch of Package audit
From 4780cd1a790286213dda646f782fa7128fb092a9 Mon Sep 17 00:00:00 2001 From: Yugend <77495782+Yugend@users.noreply.github.com> Date: Sat, 4 May 2024 00:39:36 +0300 Subject: [PATCH] avoiding of NULL pointers dereference (#366) Conflict:NA Reference:https://github.com/linux-audit/audit-userspace/commit/4780cd1a790286213dda646f782fa7128fb092a9 --- src/ausearch-parse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c index 1a5b047f..be57606b 100644 --- a/src/ausearch-parse.c +++ b/src/ausearch-parse.c @@ -719,6 +719,10 @@ static int common_path_parser(search_items *s, char *path) // append snode sn; sn.str = strdup(path); + if (sn.str == NULL) { + fprintf(stderr, "Out of memory. Check %s file, %d line\n", __FILE__, __LINE__); + return 8; + } sn.key = NULL; sn.hits = 1; // Attempt to rebuild path if relative @@ -1217,6 +1221,10 @@ skip: saved = *term; *term = 0; s->hostname = strdup(str); + if (s->hostname == NULL) { + fprintf(stderr, "Out of memory. Check %s file, %d line\n", __FILE__, __LINE__); + return 33; + } *term = saved; // Lets see if there is something more -- 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