#6637 closed defect (fixed)
[PATCH] ISCE dataset properties are not case sensitive
Reported by: | mazhe | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.2 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | driver, isce |
Cc: |
Description
Hello,
Usage of multiple version of the ISCE software showed that it does not enforce case sensitivity in its XML header.
This could lead to basic image properties (x/y size, number of bands, etc) being copied to the metadata catalog that could then replace valid values when updating the header file.
Here are two patch, one for trunk and one for the 2.1 branch to switch usage of strcmp()'s to strcasecmp()'s to avoid this.
Attachments (4)
Change History (10)
by , 8 years ago
Attachment: | isce_2.1_strcasecmp.diff added |
---|
by , 8 years ago
Attachment: | isce_trunk_strcasecmp.diff added |
---|
use strcasecmp to filter properties in the isce driver (trunk)
comment:1 by , 8 years ago
strcasecmp() doesn't exist in MSVC (at least not in older versions). Could you replace strcasecmp(a,b)==0 with EQUAL(a,b) ? The EQUAL macro defined in port/cpl_port.h will expand to whatever is available on the platform.
comment:2 by , 8 years ago
Ho, this is even better! I was suspicious of strcasecmp, and was a bit fast reading cpl_port.h. I'll update the patchs in a few secs.
by , 8 years ago
Attachment: | isce_trunk_equal.diff added |
---|
Switch strcmp()s to EQUAL to avoid case issues (patch for trunk)
by , 8 years ago
Attachment: | isce_2.1_equal.diff added |
---|
Switch strcmp()s to EQUAL to avoid case issues (patch for 2.1.x)
comment:3 by , 8 years ago
Here we go. It also filter the byte_order information to be included in metadata, as it could be saved with a wrong information too.
Thanks again
comment:6 by , 8 years ago
Milestone: | → 2.1.2 |
---|
use strcasecmp to filter properties in the isce driver (2.1 branch)