sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Remko van der Vossen (2f8dc141adb19a4e27e4c6dd9227ac4a2e89b6c2)
- From: Remko van der Vossen <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Remko van der Vossen (2f8dc141adb19a4e27e4c6dd9227ac4a2e89b6c2)
- Date: Sun, 28 Aug 2011 14:08:54 -0500
GIT changes to master grimoire by Remko van der Vossen <wich AT sourcemage.org>:
utils/installwatch/DETAILS | 2 +-
utils/installwatch/HISTORY | 4 ++++
utils/installwatch/PRE_BUILD | 1 +
utils/installwatch/installwatch-relpath.patch | 15 +++++++++++++++
4 files changed, 21 insertions(+), 1 deletion(-)
New commits:
commit 2f8dc141adb19a4e27e4c6dd9227ac4a2e89b6c2
Author: Remko van der Vossen <wich AT sourcemage.org>
Commit: Remko van der Vossen <wich AT sourcemage.org>
installwatch: patch a memory handling bug
Relative path handling in installwatch contained a bug in which the
directory size was used in a malloc for the expanded path string,
instead of a saner PATH_MAX value. (fixes #94)
diff --git a/utils/installwatch/DETAILS b/utils/installwatch/DETAILS
index 09a3776..d5aec02 100755
--- a/utils/installwatch/DETAILS
+++ b/utils/installwatch/DETAILS
@@ -1,6 +1,6 @@
SPELL=installwatch
VERSION=2010-12-12
- PATCHLEVEL=1
+ PATCHLEVEL=2
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_HASH=sha512:eda74e4a8b1707b7b5992e222baa8873b6248c0c9ef4475c521bef4dc3ba5374713ba09fc0acdaa369c67930865924994f4c15deb7b6b0e39cce5eeb6d24e50f
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL"
diff --git a/utils/installwatch/HISTORY b/utils/installwatch/HISTORY
index 31aa875..3923f54 100644
--- a/utils/installwatch/HISTORY
+++ b/utils/installwatch/HISTORY
@@ -1,3 +1,7 @@
+2011-08-28 Remko van der Vossen <wich AT sourcemage.org>
+ * DETAILS, PRE_BUILD, installwatch-relpath.patch: added patch to fix
+ incorrect memory handling in relative path handling.
+
2011-02-05 Ladislav Hagara <hgr AT vabo.cz>
* PRE_BUILD, installwatch-glibc-2.13.patch: added patch
diff --git a/utils/installwatch/PRE_BUILD b/utils/installwatch/PRE_BUILD
index c6a146c..742685b 100755
--- a/utils/installwatch/PRE_BUILD
+++ b/utils/installwatch/PRE_BUILD
@@ -3,6 +3,7 @@ cd $SOURCE_DIRECTORY &&
patch Makefile < $SPELL_DIRECTORY/ld_preload.patch &&
patch -p 1 < $SPELL_DIRECTORY/installwatch-glibc-2.13.patch &&
+patch -p 1 < $SPELL_DIRECTORY/installwatch-relpath.patch &&
sed -i "s:PREFIX=/usr/local:PREFIX=/usr:" Makefile &&
# due to the compatibility with stable sorcery
diff --git a/utils/installwatch/installwatch-relpath.patch
b/utils/installwatch/installwatch-relpath.patch
new file mode 100644
index 0000000..b0f4d11
--- /dev/null
+++ b/utils/installwatch/installwatch-relpath.patch
@@ -0,0 +1,15 @@
+diff -Naur installwatch.orig/installwatch.c installwatch/installwatch.c
+--- installwatch.orig/installwatch.c 2010-02-14 04:19:42.000000000 +0100
++++ installwatch/installwatch.c 2011-08-28 20:44:02.000000000 +0200
+@@ -1711,9 +1711,9 @@
+ snprintf(proc_path, PROC_PATH_LEN, "/proc/self/fd/%d", dirfd);
+ if(true_stat(proc_path, &s) == -1)
+ goto out;
+- if(!(newpath = malloc(s.st_size+strlen(relpath)+2)))
++ if(!(newpath = malloc(PATH_MAX+strlen(relpath)+2)))
+ goto out;
+- if((l = true_readlink(proc_path, newpath, s.st_size)) == -1)
++ if((l = true_readlink(proc_path, newpath, PATH_MAX)) == -1)
+ goto free_out;
+ newpath[l] = '/';
+ strcpy(newpath + l + 1, relpath);
- [SM-Commit] GIT changes to master grimoire by Remko van der Vossen (2f8dc141adb19a4e27e4c6dd9227ac4a2e89b6c2), Remko van der Vossen, 08/28/2011
Archive powered by MHonArc 2.6.24.