Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Factory:Rebuild
autotrace
CVE-2019-19005.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2019-19005.patch of Package autotrace
From 268aee495bf0efbd0a548c7318203123d3bfb598 Mon Sep 17 00:00:00 2001 From: Matthew Pruett <matthewtpruett@yahoo.com> Date: Sat, 6 Feb 2021 23:25:09 -0500 Subject: [PATCH] Check for size 0 passed to malloc and calloc Handling of size 0 is implementation-defined and may lead to vulnerabilities based on implementation (https://wiki.sei.cmu.edu/confluence/display/c/MEM04-C.+Beware+of+zero-length+allocations). This fixes CVE-2017-9182 and CVE-2017-9190. --- src/xstd.h | 4 ++++ 1 file changed, 4 insertions(+) Index: autotrace-0.31.1/xstd.h =================================================================== --- autotrace-0.31.1.orig/xstd.h +++ autotrace-0.31.1/xstd.h @@ -20,6 +20,7 @@ #define XMALLOC(new_mem, size) \ do \ { \ + assert(size); \ new_mem = (at_address) malloc (size); \ assert(new_mem); \ } while (0) @@ -28,6 +29,7 @@ do \ #define XCALLOC(new_mem, size) \ do \ { \ + assert(size); \ new_mem = (at_address) calloc (size, 1); \ assert(new_mem); \ } while (0) @@ -55,6 +57,7 @@ do \ #define XMALLOC(new_mem, size) \ do \ { \ + assert(size); \ (at_address&)(new_mem) = (at_address) malloc (size); \ assert(new_mem); \ } while (0) @@ -63,6 +66,7 @@ do \ #define XCALLOC(new_mem, sizex) \ do \ { \ + assert(sizex); \ (at_address&)(new_mem) = (void *) calloc (sizex, 1); \ assert(new_mem); \ } while (0)
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