diff options
author | Minyoung, Song <minyoung.song@samsung.com> | 2016-03-30 11:14:32 +0900 |
---|---|---|
committer | Minyoung, Song <minyoung.song@samsung.com> | 2016-03-30 11:14:32 +0900 |
commit | 99115c352f766b04639911693ee9b5fe97ee2531 (patch) | |
tree | b162aaccb2929042ed7f63bd930a1fbe4604b23d | |
parent | 7e75a143f988a643d75490453108ea020038c0b1 (diff) | |
download | memps-99115c352f766b04639911693ee9b5fe97ee2531.tar.gz memps-99115c352f766b04639911693ee9b5fe97ee2531.tar.bz2 memps-99115c352f766b04639911693ee9b5fe97ee2531.zip |
Bug fix for guaranteeing NULL-termination of strncpysubmit/tizen/20160428.011632accepted/tizen/wearable/20160428.081406accepted/tizen/tv/20160428.081416accepted/tizen/mobile/20160428.081355accepted/tizen/ivi/20160428.081420accepted/tizen/common/20160428.144412
Change-Id: I8ef500d9007f0b151fcc5558cc5faab84dbb9d7c
Signed-off-by: Minyoung, Song <minyoung.song@samsung.com>
-rw-r--r-- | memps.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -345,7 +345,7 @@ mapinfo *read_mapinfo(char** smaps, int rest_line) mi->perm[3] = line[21]; /* may share or private */ if (len < 50) - strncpy(mi->name, "[anon]", strlen("[anon]")); + strncpy(mi->name, "[anon]", strlen("[anon]")+1); else strncpy(mi->name, line + 49, len); |