[MacPorts] #43632: cdrtools @3.00_1: mkisofs receives abort trap on Mavericks host if -graft-points option is used
MacPorts
noreply at macports.org
Thu May 8 07:34:56 PDT 2014
#43632: cdrtools @3.00_1: mkisofs receives abort trap on Mavericks host if -graft-
points option is used
------------------------+--------------------------------
Reporter: galitsyn@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Keywords: mkisofs | Port: cdrtools
------------------------+--------------------------------
Hi Guys!
The problem might be easily reproduced here if the next command line is
executed:
{{{
mkisofs -graft-points a=b
}}}
This issue occurs on Mavericks (10.9.2) host only and I can't reproduce it
on Mountain Lion (10.8.5) host.
I took a look to the
ftp://ftp.berlios.de/pub/cdrecord/cdrtools-3.00.tar.bz2 sources and was
able to fix it for myself. The patch below fixes the issue:
{{{
--- cdrtools-3.00/mkisofs/mkisofs.c.orig 2010-04-25
18:29:03.000000000 +0400
+++ cdrtools-3.00/mkisofs/mkisofs.c 2014-05-08 18:04:33.000000000
+0400
@@ -3235,15 +3235,15 @@
/*
* Remove unwanted "./" & "/" sequences from start...
*/
+ xpnt = graft_point;
do {
- xpnt = graft_point;
while (xpnt[0] == '.' && xpnt[1] == '/')
xpnt += 2;
while (*xpnt == PATH_SEPARATOR) {
xpnt++;
}
- strlcpy(graft_point, xpnt, glen);
- } while (xpnt > graft_point);
+ } while (graft_point++ < glen);
+ graft_point = xpnt;
if (node) {
node = escstrcpy(nodename, nlen, ++node);
}}}
The problem was that strlcpy() used source and destination strings which
overlap. Could you please take a look to the issue?
Thank you!
--
Ticket URL: <https://trac.macports.org/ticket/43632>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list