Opened 18 years ago
Last modified 17 years ago
#1950 closed defect
msOGRLayerGetAutoStyle passes NULL pointer to GetRGBFromString causing access violation — at Initial Version
Reported by: | szekerest | Owned by: | szekerest |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OGR Support | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: | dmorissette |
Description
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); }
Note:
See TracTickets
for help on using tickets.