Opened 14 years ago
Closed 14 years ago
#3704 closed defect (fixed)
Logical OR where AND expected in OGRStyleMgr::GetPart
Reported by: | Mateusz Łoskot | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | style |
Cc: |
Description (last modified by )
In file [source;trunk/gdal/ogr/ogrfeaturestyle.cpp@19068#L673 ogrfeaturestyle.cpp], line 673, there is condition that looks suspicious:
if ( pszString || strlen(pszString) > 0 )
I think the OR should read AND. Current version may lead to strlen(0) which is invalid.
Change History (2)
comment:1 by , 14 years ago
Description: | modified (diff) |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
r20174 /trunk/gdal/ogr/ogrfeaturestyle.cpp: Remove useless test - pszString cannot be NULL (code cleanup - prev. code was OK) (#3704)
The strlen(pszString) > 0 test could also be removed as the CreateStyleToolFromStyleString() function would also work with a "" string.