calma/CalmaWrite.c: calmaProcessBoundary() Dereference of null pointer
Theoretical NULL pointer deref. Seems like false positive as a BOUNDARY record does not make sense with no points. This guards against a potential crash from a bad data model. SonarCloud Dereference of null pointer https://sonarcloud.io/project/issues?open=AZJB17hXNGfDNup0Rktk&id=dlmiles_magic
This commit is contained in:
parent
a3a40bee73
commit
dd6bb9baf4
|
|
@ -2407,8 +2407,11 @@ calmaProcessBoundary(
|
||||||
calmaOutI4(lbref->lb_start.p_y * calmaPaintScale, f);
|
calmaOutI4(lbref->lb_start.p_y * calmaPaintScale, f);
|
||||||
chkcount++;
|
chkcount++;
|
||||||
}
|
}
|
||||||
calmaOutI4(listtop->lb_start.p_x * calmaPaintScale, f);
|
if (listtop != NULL)
|
||||||
calmaOutI4(listtop->lb_start.p_y * calmaPaintScale, f);
|
{
|
||||||
|
calmaOutI4(listtop->lb_start.p_x * calmaPaintScale, f);
|
||||||
|
calmaOutI4(listtop->lb_start.p_y * calmaPaintScale, f);
|
||||||
|
}
|
||||||
|
|
||||||
if (chkcount != bounds->bt_points)
|
if (chkcount != bounds->bt_points)
|
||||||
TxError("Points recorded=%d; Points written=%d\n",
|
TxError("Points recorded=%d; Points written=%d\n",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue