summaryrefslogtreecommitdiff
path: root/audio/freezetag/patches
diff options
context:
space:
mode:
authorhubertf <hubertf>2000-12-02 13:26:05 +0000
committerhubertf <hubertf>2000-12-02 13:26:05 +0000
commit403090c4a4dd9a3d99356067853078d8a4f7f970 (patch)
treeadabdb215ee885923f936d39ac688abbcaf62f35 /audio/freezetag/patches
parent043509839f6c6e42d1c6b7e0a2a23aaf23a603e4 (diff)
downloadpkgsrc-403090c4a4dd9a3d99356067853078d8a4f7f970.tar.gz
Don't try to malloc -10 bytes if there's no ID3 tag existing of if
something else is broken. Prevents this from aborting immediately on me.
Diffstat (limited to 'audio/freezetag/patches')
-rw-r--r--audio/freezetag/patches/patch-ae15
1 files changed, 15 insertions, 0 deletions
diff --git a/audio/freezetag/patches/patch-ae b/audio/freezetag/patches/patch-ae
new file mode 100644
index 00000000000..a9de6e1f09a
--- /dev/null
+++ b/audio/freezetag/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 2000/12/02 13:26:05 hubertf Exp $
+
+--- src/util.c.orig Fri Apr 9 00:12:25 1999
++++ src/util.c
+@@ -28,7 +28,9 @@
+ gchar *part;
+ gint i;
+
+- if( strlen(original) < offset+length )
++ /* Only re-calculate length if there is anything there, prevent
++ * negative length! - HF */
++ if( strlen(original) < offset+length && strlen(original) > offset)
+ length = strlen(original) - offset;
+
+ part = g_malloc0( length * sizeof(original[0]) );