From ebf76495de023b64124598f41405b3405238d4d5 Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Mar 28 2010 09:14:47 +0000 Subject: Change strcpy to ctrncpy to copy userid in storage.c --- diff --git a/blender-2.49b-uid.patch b/blender-2.49b-uid.patch new file mode 100644 index 0000000..971c2c9 --- /dev/null +++ b/blender-2.49b-uid.patch @@ -0,0 +1,13 @@ +diff -up blender-2.49b/source/blender/blenlib/intern/storage.c.sf blender-2.49b/source/blender/blenlib/intern/storage.c +--- blender-2.49b/source/blender/blenlib/intern/storage.c.sf 2010-03-28 10:14:15.140027561 +0200 ++++ blender-2.49b/source/blender/blenlib/intern/storage.c 2010-03-28 10:19:55.630278553 +0200 +@@ -381,7 +381,8 @@ void BLI_adddirstrings() + struct passwd *pwuser; + pwuser = getpwuid(files[num].s.st_uid); + if ( pwuser ) { +- strcpy(files[num].owner, pwuser->pw_name); ++ strncpy(files[num].owner, pwuser->pw_name, 16); ++ files[num].owner[15] = '\0'; + } else { + sprintf(files[num].owner, "%d", files[num].s.st_uid); + } diff --git a/blender.spec b/blender.spec index 11f9b94..6d84fbf 100644 --- a/blender.spec +++ b/blender.spec @@ -5,7 +5,7 @@ Name: blender Version: 2.49b -Release: 5%{?dist} +Release: 6%{?dist} Summary: 3D modeling, animation, rendering and post-production @@ -24,6 +24,7 @@ Source100: blender-repack.sh Patch1: blender-2.49-scons.patch Patch2: blender-2.44-bid.patch +Patch3: blender-2.49b-uid.patch # Both patches are forwarded to upstream via email #Patch100: blender-2.46rc3-cve-2008-1103-1.patch @@ -105,6 +106,7 @@ Blender Game Engine. %setup -q %patch1 -p1 -b .org %patch2 -p1 -b .bid +%patch3 -p1 -b .uid %patch100 -p1 -b .cve # %patch101 -p1 @@ -244,7 +246,10 @@ fi || : %{_bindir}/blenderplayer.bin %changelog -* Wed Jan 13 2010 Jochen Schmitt - 2.49b-5 +* Sun Mar 28 2010 Jochen Schmitt 2.49b-6 +- Try to fix copy of userid into files.owner (#572186) + +* Wed Jan 13 2010 Jochen Schmitt 2.49b-5 - Add forgotten patch * Wed Jan 13 2010 Jochen Schmitt 2.49b-4