diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-05-05 14:19:10 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-05-05 14:19:10 +0000 |
commit | ca01692fea21bb0a51febaae50b9fce130647245 (patch) | |
tree | 6fa92d889b032dd2d428c0406b185921ea970773 /sysutils | |
parent | Simplify patch. (diff) |
Fix a gross bug in the El Torito stuff, causing a coredump during exit().
Notes
Notes:
svn path=/head/; revision=6414
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/mkisofs-devel/files/patch-ad | 21 | ||||
-rw-r--r-- | sysutils/mkisofs/files/patch-ad | 21 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sysutils/mkisofs-devel/files/patch-ad b/sysutils/mkisofs-devel/files/patch-ad new file mode 100644 index 000000000000..f7f28be83269 --- /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; diff --git a/sysutils/mkisofs/files/patch-ad b/sysutils/mkisofs/files/patch-ad new file mode 100644 index 000000000000..f7f28be83269 --- /dev/null +++ b/sysutils/mkisofs/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; |