#1950 closed defect (fixed)
msOGRLayerGetAutoStyle passes NULL pointer to GetRGBFromString causing access violation — at Version 5
Reported by: | szekerest | Owned by: | szekerest |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OGR Support | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: | dmorissette |
Description (last modified by )
msOGRLayerGetAutoStyle may pass NULL pointer to GetRGBFromString causing access violation. In my test case the brush style in the OGR MapInfo tab file contains ForeColor but does not contain BackColor style. In this case poBrushStyle->BackColor(bIsNull) returns NULL and bIsNull = true; To fix the problem the following code fragment is used: pszColor = poBrushStyle->BackColor(bIsNull); if (!bIsNull && poBrushStyle->GetRGBFromString(pszColor,r,g,b,t)) { MS_INIT_COLOR(c->styles[0].backgroundcolor, r, g, b); }
Change History (5)
comment:2 by , 17 years ago
I'm sure I have already fixed this problem for the CVS HEAD. "Revision 1.103 2006/10/22 17:48:24 tamas Changed OGRLayerGetAutoStyle not to pass NULL pointer to GetRGBFromString causing access violation." However it have not been backported to 4.10 yet. Tamas
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I believe we can mark this bug FIXED then?
comment:5 by , 17 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Note that the fix will be released in MapServer 4.10.2 (and 5.0).
The following GDAL bug is related to this issue as well: http://trac.osgeo.org/gdal/ticket/1571
Note:
See TracTickets
for help on using tickets.