[Apps] Fix warnings from cm_data
[Apps] Fix warnings from cm_data

With stricter gcc from Yocto 3.0, cm_data has warnings of type
[-Werror=format-truncation=]. This is due to the snprintf statements,
which could result in truncation, if left unchecked.

  apps/tools/cm/cm_data.c:750:50: error: '%s' directive output may be
  truncated writing 5 bytes into a region of size between 0 and 511
  [-Werror=format-truncation=]
    750 |     snprintf(configPath, sizeof(configPath), "%s/%s", ConfigTreeRoot, "tools");
        |                                                  ^~
Add return value checks for the snprintf and assert.

Resolves: LE-14582
Change-Id: Idfbbb8a22891c66362dcfa2bf6db6fc40c30297f
Signed-off-by: Anju Kunjumon <dbb7adda0ef4f1f0f8d6226fb374386d3cbdc198@sierrawireless.com>

legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af