aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/mkisofs-devel
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-05-05 22:19:10 +0800
committerjoerg <joerg@FreeBSD.org>1997-05-05 22:19:10 +0800
commit4c8f462fac8f689e2631c8400c7a851d0d31f1e0 (patch)
tree481e374b127ab6e4f99307d35c4f96c000e219a8 /sysutils/mkisofs-devel
parente1805fec568d49d2053ed2a0b83a9fd0d8a46414 (diff)
downloadfreebsd-ports-graphics-4c8f462fac8f689e2631c8400c7a851d0d31f1e0.tar.gz
freebsd-ports-graphics-4c8f462fac8f689e2631c8400c7a851d0d31f1e0.tar.zst
freebsd-ports-graphics-4c8f462fac8f689e2631c8400c7a851d0d31f1e0.zip
Fix a gross bug in the El Torito stuff, causing a coredump during exit().
Diffstat (limited to 'sysutils/mkisofs-devel')
-rw-r--r--sysutils/mkisofs-devel/files/patch-ad21
1 files changed, 21 insertions, 0 deletions
diff --git a/sysutils/mkisofs-devel/files/patch-ad b/sysutils/mkisofs-devel/files/patch-ad
new file mode 100644
index 00000000000..f7f28be8326
--- /dev/null
+++ b/sysutils/mkisofs-devel/files/patch-ad
@@ -0,0 +1,21 @@
+--- eltorito.c.orig Mon May 5 15:46:11 1997
++++ eltorito.c Mon May 5 16:11:42 1997
+@@ -33,6 +33,9 @@
+ #include "mkisofs.h"
+ #include "iso9660.h"
+
++#undef MIN
++#define MIN(a, b) (((a) < (b))? (a): (b))
++
+ static struct eltorito_validation_entry valid_desc;
+ static struct eltorito_defaultboot_entry default_desc;
+
+@@ -158,7 +161,7 @@
+ * but who really reads this stuff!
+ */
+ if (publisher)
+- memcpy_max(valid_desc.id, publisher, strlen(publisher));
++ memcpy_max(valid_desc.id, publisher, MIN(31, strlen(publisher)));
+
+ valid_desc.key1[0] = 0x55;
+ valid_desc.key2[0] = 0xAA;