Projects
Factory:RISC-V:Base
util-linux
_service:tar_scm:backport-libfdisk-dereference-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-libfdisk-dereference-of-possibly-NULL-gcc-analyzer.patch of Package util-linux
From fb1689c1de5fdc945c599aa46b483fa5e1333935 Mon Sep 17 00:00:00 2001 From: Karel Zak <kzak@redhat.com> Date: Wed, 18 Aug 2021 11:15:55 +0200 Subject: [PATCH] libfdisk: dereference of possibly-NULL [gcc-analyzer] Signed-off-by: Karel Zak <kzak@redhat.com> --- libfdisk/src/parttype.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c index 3a5db9c..271b671 100644 --- a/libfdisk/src/parttype.c +++ b/libfdisk/src/parttype.c @@ -26,6 +26,9 @@ struct fdisk_parttype *fdisk_new_parttype(void) { struct fdisk_parttype *t = calloc(1, sizeof(*t)); + if (!t) + return NULL; + t->refcount = 1; t->flags = FDISK_PARTTYPE_ALLOCATED; DBG(PARTTYPE, ul_debugobj(t, "alloc")); -- 1.8.3.1
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