8a8b31d05c
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>
20 lines
695 B
C++
20 lines
695 B
C++
--- cfdblock.cpp.orig Tue Aug 19 18:22:14 2003
|
|
+++ cfdblock.cpp Tue Aug 19 18:23:24 2003
|
|
@@ -124,7 +124,7 @@
|
|
ra_size = cab_header.get_datablock_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;
|
|
}
|
|
@@ -154,7 +154,7 @@
|
|
|
|
if(ra_size) // If reserve area, write it
|
|
{
|
|
- if(out.write(reserved_area, ra_size).fail()) return WRITE_ERROR;
|
|
+ if(out.write((char*)reserved_area, ra_size).fail()) return WRITE_ERROR;
|
|
}
|
|
// write data to stream
|
|
// if(out.write(compressed_data, compressed_size).bad()) return WRITE_ERROR;
|