summaryrefslogtreecommitdiff
path: root/sysutils/mkisofs/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/mkisofs/patches/patch-ac')
-rw-r--r--sysutils/mkisofs/patches/patch-ac30
1 files changed, 30 insertions, 0 deletions
diff --git a/sysutils/mkisofs/patches/patch-ac b/sysutils/mkisofs/patches/patch-ac
new file mode 100644
index 00000000000..fe958460161
--- /dev/null
+++ b/sysutils/mkisofs/patches/patch-ac
@@ -0,0 +1,30 @@
+--- name.c.orig Sat Mar 15 04:02:46 1997
++++ name.c Mon Apr 28 11:50:47 1997
+@@ -57,6 +57,7 @@
+ const char * pnt;
+ int priority = 32767;
+ char * result;
++ char * copy;
+ int seen_dot = 0;
+ int seen_semic = 0;
+ int tildes = 0;
+@@ -104,12 +105,17 @@
+ last_dot = strrchr (pnt,'.');
+ if( (last_dot != NULL)
+ && ( (last_dot[1] == '~')
+- || (last_dot[1] == '\0')
+ || (last_dot[1] == '\0')) )
+ {
++ /*
++ * We gotta copy the string first, to work around its constness.
++ */
++ copy = alloca (strlen(name) + 1);
++ memcpy (copy, name, strlen(name) + 1);
++ pnt = copy;
++ last_dot = strrchr (pnt,'.');
+ *last_dot = '\0';
+ last_dot = strrchr (pnt,'.');
+- *last_dot = '.';
+ }
+
+ while(*pnt)