diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-28 16:12:45 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-28 16:19:00 +0200 |
commit | d65f3ea18eb08925bec3afc169869ee1a2453c81 (patch) | |
tree | cf408c56c67bbcbb757c3298bb9ce50f4eb44490 /src/coding/gsm0503_coding.c | |
parent | a2501a20651bad1c1645547c8ad99af4f5c64e2e (diff) |
vty/command.c: write_config_file(): sanely compose temp path
Fix GCC version 7.3.0 (Debian 7.3.0-12) compiler warning:
../../../../src/libosmocore/src/vty/command.c: In function ‘write_config_file’:
../../../../src/libosmocore/src/vty/command.c:2741:2: error: null destination pointer [-Werror=format-overflow=]
sprintf(config_file_tmp, "%s.XXXXXX", config_file);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check agains NULL after each _talloc_zero() in write_config_file().
While at it, add a comment explaining why we don't use talloc_asprintf() instead.
Change-Id: I7bdc52afe724c1d21f419fe49a6e2ebca9420969
Diffstat (limited to 'src/coding/gsm0503_coding.c')
0 files changed, 0 insertions, 0 deletions