diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-08-31 13:09:31 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-08-31 13:09:31 +0000 |
commit | 8a8b31d05cd02391ec25bd1600ee963651314cb2 (patch) | |
tree | 51f9d0c5cf9417d032d59d737d75e7aa133b785d /archivers/libcabinet/files/patch-cffolder.cpp | |
parent | - New port mail/p5-Email-FolderType: Determine the type of a (diff) |
[patch] Unbreak port: archivers/libcabinet
This port did not build with gcc 3.3.1. I also fixed a
possible buffer overflow (they used gets() to read from
stdin).
Please review the patch file ``patch-cftypes.cpp'' with
extra care, since I am not sure whether this makes sense
(2 positions in the file, marked with ``TODO'' - thanks.
Also added some lines in cftypes.cpp to overcome the absence of
values.h on -current.
PR: ports/55767
Submitted by: Simon Barner <barner@in.tum.de>
Notes
Notes:
svn path=/head/; revision=88198
Diffstat (limited to 'archivers/libcabinet/files/patch-cffolder.cpp')
-rw-r--r-- | archivers/libcabinet/files/patch-cffolder.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/archivers/libcabinet/files/patch-cffolder.cpp b/archivers/libcabinet/files/patch-cffolder.cpp new file mode 100644 index 000000000000..74db8f570365 --- /dev/null +++ b/archivers/libcabinet/files/patch-cffolder.cpp @@ -0,0 +1,20 @@ +--- cffolder.cpp.orig Tue Aug 19 18:23:48 2003 ++++ cffolder.cpp Tue Aug 19 18:24:14 2003 +@@ -70,7 +70,7 @@ + ra_size = cab_header.get_folder_ra_size(); + reserved_area = new byte[ra_size]; + +- if(in.read(reserved_area, ra_size).bad()) ++ if(in.read((char*)reserved_area, ra_size).bad()) + { + return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF; + } +@@ -90,7 +90,7 @@ + + if(ra_size) // If reserved area present + { +- if(out.write(reserved_area, ra_size).fail()) { return WRITE_ERROR; } ++ if(out.write((char*)reserved_area, ra_size).fail()) { return WRITE_ERROR; } + } + + return OK; |