cfs-tools / cfs-basecamp

Provides a framework and tools for developing, downloading, and integrating core Flight System (cFS) applications into an operational system.
Other
24 stars 2 forks source link

Update app_c_fw to meet stricter compiler checks #75

Closed open-stemware closed 4 months ago

open-stemware commented 4 months ago
  1. childmgr.c's AppendIdToStr(): The sprintf(IdStr,"%d",NameStrId++); statement could have an overflow. NameStrId is defined as an uint16 so the text representation could be greater that the dimension of IdStr[4]. In reality only a couple of IDs will be created per target so NameStrId can be defined as an uint8.

  2. inittbl.c BuildJsonTblObjArray():

There are three occurrences of the folowing statement. strncat(JsonParam->Query.Key, CfgStrPtr, CJSON_MAX_KEY_LEN);

The code should be changed to strncat(JsonParam->Query.Key, CfgStrPtr, CJSON_MAX_KEY_LEN-1);