diff options
author | Junghyun Yeon <jungh.yeon@samsung.com> | 2018-02-05 13:51:47 +0900 |
---|---|---|
committer | Junghyun Yeon <jungh.yeon@samsung.com> | 2018-02-19 04:18:13 +0000 |
commit | 4edf8a06ed736b73c29350ec664cd8299fc0a163 (patch) | |
tree | 011e5889567e13a284a4b022b335ab243d82703c | |
parent | 77cca4a0e9f6f3477f7c113c9de91b1955eec57f (diff) | |
download | pkgmgr-server-tizen_4.0_tv.tar.gz pkgmgr-server-tizen_4.0_tv.tar.bz2 pkgmgr-server-tizen_4.0_tv.zip |
Fix possible corruptiontizen_4.0_tv
- Memory corruption tool detects that
local char array could be uninitialized even if
g_io_channel_read_chars returns G_IO_STATUS_NORMAL
so it should be initialized at declaration.
Change-Id: I927bbb174d0e657b47f27ed42739f503e9fdf6d6
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
(cherry picked from commit 95a7e5888138abbc6f581e17c7bee7f2be27a9f1)
-rw-r--r-- | src/pkgmgr-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkgmgr-server.c b/src/pkgmgr-server.c index 1bcadf7..c647ae5 100644 --- a/src/pkgmgr-server.c +++ b/src/pkgmgr-server.c @@ -237,7 +237,7 @@ static gboolean getsize_io_handler(GIOChannel *io, GIOCondition cond, GError *err = NULL; GIOStatus s; gsize len; - char buf[MAX_LONGLONG_LENGTH]; + char buf[MAX_LONGLONG_LENGTH] = {0}; long long result = 0; struct backend_job *job = (struct backend_job *)data; struct getsize_sync_extra_info *extra_getsize_info = |