#3162 closed enhancement (invalid)
Fixes and patches for libecwj2
Reported by: | Mateusz Łoskot | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | libecwj, libecwj2, ecw, 32-bit, 64-bit |
Cc: |
Description (last modified by )
The purpose of this ticket is to archive patches and improvements to libecwj2 library
It should provide GDAL users with help in building libecwj2 binaries from source using various recent compilers like
- Microsoft Visual C++ 9.0+
- GCC 4.x+
for 32-bit and 64-bit architectures.
The patches mainly target sources of libecwj2-3.3.
Related tickets:
- #2032 - Building with ECW support on Mac OS X
- #1347 - Current CVS doesn't build using ECW support with GCC 4.1
- MS 3245 - large virtual memory leak opening and closing many ecw files.
Related discussions:
- Looking for libecwj2.dll Win-64Bit version
- GDAL and ECW
- Patch to build libecwj2-3.3.tar.gz with GCC 4.1
Please, report problems as comments below and feel free to attach patches. Hopefully, the libecwj developer will find all this information useful.
Attachments (1)
Change History (7)
by , 15 years ago
Attachment: | libecwj2-3.3-msvc90-fixes.patch added |
---|
comment:1 by , 15 years ago
Keywords: | 32-bit 64-bit added |
---|
comment:2 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
This isn't actually a ticket about GDAL so I'm disinclined to treat it as an open issue. It may be extended of course with additional material to help those building the ecw libraries, but I feel this material really belongs off:
comment:5 by , 14 years ago
Description: | modified (diff) |
---|
comment:6 by , 7 years ago
An additional patch was found to be needed on recent Ubuntu (16.04) to fix a crash when tinyxml attempts to open a directory with fopen(), which succeeds, but seeking to end of file and getting the offset returns the value -1 cast a UINT64_MAX, which cause a later crash in a memory allocation
Fixed with:
diff -ur libecwj2-3.3-2006-09-06/Source/C/tinyxml/tinyxml.cpp libecwj2-3.3/Source/C/tinyxml/tinyxml.cpp --- libecwj2-3.3-2006-09-06/Source/C/tinyxml/tinyxml.cpp 2006-07-03 03:15:12.000000000 +0200 +++ libecwj2-3.3/Source/C/tinyxml/tinyxml.cpp 2016-12-16 23:34:26.141000205 +0100 @@ -983,7 +983,7 @@ fseek( file, 0, SEEK_SET ); // Strange case, but good to handle up front. - if ( length == 0 ) + if ( length <= 0 || length > INT_MAX ) { fclose( file ); return false;
Cumulative patch created at https://trac.osgeo.org/gdal/attachment/wiki/ECW/libecwj2-3.3.patch
Patch with fixes made against source of libecwj2-3.3-2006-09-06 required to build it using Visual C++ 9.0 on 32 and 64 bit arch.