aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslushpupie2013-11-26 14:29:13 -0600
committerAdam Vandenberg2013-11-26 22:08:13 -0800
commit764ea730e7c393d6af044cfe47c2a9c7cc4ea15f (patch)
treea366bd07cc41f2d1c0db6630eb9ceb96e72deb89
parentcb318b42fa840626fa312978d937dc7025675115 (diff)
downloadhomebrew-764ea730e7c393d6af044cfe47c2a9c7cc4ea15f.tar.bz2
cdrdao: increase device path buffer size
The device path name is very long, as long as 482 characters now. This increases the buffer size to store the path to 1024 characters. Closes #24689. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/cdrdao.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/Library/Formula/cdrdao.rb b/Library/Formula/cdrdao.rb
index e300b5711..f0da11b32 100644
--- a/Library/Formula/cdrdao.rb
+++ b/Library/Formula/cdrdao.rb
@@ -24,7 +24,7 @@ class Cdrdao < Formula
# http://sourceforge.net/tracker/?func=detail&aid=3381672&group_id=2171&atid=102171
def patches
{ :p1 => "http://sourceforge.net/tracker/download.php?group_id=2171&atid=302171&file_id=369387&aid=2981804",
- :p0 => "http://trac.macports.org/export/90637/trunk/dports/sysutils/cdrdao/files/cdrdao-device-default-bufsize.patch" }
+ :p0 => DATA }
end
def install
@@ -33,3 +33,25 @@ class Cdrdao < Formula
system "make install"
end
end
+
+__END__
+--- dao/main.cc 2013-11-26 12:00:00.000000000 -0400
++++ dao/main.cc 2013-11-26 12:00:00.000000000 -0400
+@@ -1242,7 +1242,7 @@
+ const char* getDefaultDevice(DaoDeviceType req)
+ {
+ int i, len;
+- static char buf[128];
++ static char buf[1024];
+
+ // This function should not be called if the command issues
+ // doesn't actually require a device.
+@@ -1270,7 +1270,7 @@
+ if (req == NEED_CDRW_W && !rww)
+ continue;
+
+- strncpy(buf, sdata[i].dev.c_str(), 128);
++ strncpy(buf, sdata[i].dev.c_str(), 1024);
+ delete[] sdata;
+ return buf;
+ }