Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37657124
en ru br
ALT Linux repos
S:2.20.1-alt3
4.0: 2.6-alt1
3.0: 0.2.6.1-alt3

Group :: Development/Tools
RPM: fakechroot

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: pull-85-0001-tmpnam.c-fix-heap-overflow.patch
Download


From 534e6d555736b97211523970d378dfb0db2608e9 Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Mon, 22 Feb 2021 21:44:07 -0800
Subject: [PATCH 1/6] tmpnam.c: fix heap overflow
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 src/tmpnam.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tmpnam.c b/src/tmpnam.c
index ce60817..917ee6b 100644
--- a/src/tmpnam.c
+++ b/src/tmpnam.c
@@ -42,7 +42,7 @@ wrapper(tmpnam, char *, (char * s))
 
     expand_chroot_path(ptr);
 
-    ptr2 = malloc(strlen(ptr));
+    ptr2 = malloc(strlen(ptr) + 1);
     if (ptr2 == NULL) return NULL;
 
     strcpy(ptr2, ptr);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin