Fix memory issue 80/201980/1 accepted/tizen/unified/20190325.070918 submit/tizen/20190322.082036
authorYunjin Lee <yunjin-.lee@samsung.com>
Thu, 21 Mar 2019 10:22:26 +0000 (19:22 +0900)
committerYunjin Lee <yunjin-.lee@samsung.com>
Thu, 21 Mar 2019 10:25:41 +0000 (19:25 +0900)
commit2d226440eef4f4c31e747c6409b1619c7a3e57c9
treec80efc489caa3f0fadde4939ada9079db6d56e08
parentae5b9ecb314c27e4ab1dc1f04f2ca72b58060145
Fix memory issue

- The function setlocale() returns a pointer to a string that represents
the current locale setting and the string can be overwritten by
subsequent calls to setlocale(). Hence to store original locale
properly, modify it to copy the string and free after use. Otherwise, it
can cause heap buffer overflow or heap use after free issue.

Change-Id: I8267904aa83e602da8e5567a97b44f17d7a892cb
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
src/privilege_information.c