diff options
author | Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> | 2019-01-03 16:58:10 +0530 |
---|---|---|
committer | Saya Sugiura <ssugiura@jp.adit-jv.com> | 2019-05-06 17:00:59 +0900 |
commit | 4a728bfb6508265b65d91ea8f5e112d1689ceb3f (patch) | |
tree | aef21c66f9dafb585e86ab349e9ed1633caa4135 /src/shared/dlt_common.c | |
parent | 75e69a24fbe5c8b70971c287919a8a3ebda22950 (diff) | |
download | DLT-daemon-4a728bfb6508265b65d91ea8f5e112d1689ceb3f.tar.gz |
dlt-control: Bug fix for broken get log info
strtol converts extra data in the array, so it leads to data crash.
It is now fixed to fill the last byte of the array with null
character once data copy complete and before convert.
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
Diffstat (limited to 'src/shared/dlt_common.c')
-rw-r--r-- | src/shared/dlt_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c index c44be67..bbbd682 100644 --- a/src/shared/dlt_common.c +++ b/src/shared/dlt_common.c @@ -3825,7 +3825,7 @@ int16_t dlt_getloginfo_conv_ascii_to_int16_t(char *rp, int *rp_count) void dlt_getloginfo_conv_ascii_to_id(char *rp, int *rp_count, char *wp, int len) { - char number16[2] = { 0 }; + char number16[3] = {0}; char *endptr; int count; |