diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2018-02-09 13:11:54 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2018-02-09 13:11:54 +0900 |
commit | 3f3a1003bf42841945cfd0a0607b8e991b8ef87f (patch) | |
tree | 77ccfa8ceffb668d3c0e036a640aa4b62b85405f /src/ipc | |
parent | b3ceefb00b997a50a3da4288b6af3a56f89385c3 (diff) | |
download | libmedia-thumbnail-3f3a1003bf42841945cfd0a0607b8e991b8ef87f.tar.gz libmedia-thumbnail-3f3a1003bf42841945cfd0a0607b8e991b8ef87f.tar.bz2 libmedia-thumbnail-3f3a1003bf42841945cfd0a0607b8e991b8ef87f.zip |
[SATIZENVUL-1315,1316] Reinforced the missing codesubmit/tizen/20180208.063721accepted/tizen/unified/20180213.132810
Change-Id: Ia42ba6850a64b360e36b16c42df2d125772685c4
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/ipc')
-rwxr-xr-x | src/ipc/media-thumb-ipc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c index 4fb6cd8..9f652a2 100755 --- a/src/ipc/media-thumb-ipc.c +++ b/src/ipc/media-thumb-ipc.c @@ -270,7 +270,19 @@ int _media_thumb_recv_msg(int sock, int header_size, thumbMsg *msg) } memcpy(msg, buf, header_size); - //thumb_dbg("thumb_size : %d", msg->thumb_size); + + if (strlen(msg->org_path) == 0 || strlen(msg->org_path) >= MAX_FILEPATH_LEN) { + thumb_err("org_path size is invalid %d", strlen(msg->org_path)); + + return MS_MEDIA_ERR_SOCKET_RECEIVE; + } + + /* it can be empty string */ + if (strlen(msg->dst_path) >= MAX_FILEPATH_LEN) { + thumb_err("dst_path size is invalid %d", strlen(msg->dst_path)); + + return MS_MEDIA_ERR_SOCKET_RECEIVE; + } SAFE_FREE(buf); if (msg->thumb_size < 0) { |