summaryrefslogtreecommitdiff
path: root/src/media-thumbnail.c
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-15 16:15:44 (GMT)
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-15 16:15:44 (GMT)
commit3ff947580f7829ddff385f73d59faeb96e52dcf3 (patch)
tree838c082eea3a355ff694d86cf6d542c92c81b58a /src/media-thumbnail.c
parentb8ccdef0306cf19cde9511ec244fd43b4ae1d863 (diff)
downloadlibmedia-thumbnail-3ff947580f7829ddff385f73d59faeb96e52dcf3.zip
libmedia-thumbnail-3ff947580f7829ddff385f73d59faeb96e52dcf3.tar.gz
libmedia-thumbnail-3ff947580f7829ddff385f73d59faeb96e52dcf3.tar.bz2
merge with master
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-xsrc/media-thumbnail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index 11bcc0b..420414e 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -103,9 +103,10 @@ int thumbnail_request_save_to_file(const char *origin_path, media_thumb_type thu
}
media_thumb_info thumb_info;
- char tmp_thumb_path[MAX_PATH_SIZE] = {0,};
+ char tmp_thumb_path[MAX_PATH_SIZE + 1] = {0,};
strncpy(tmp_thumb_path, thumb_path, sizeof(tmp_thumb_path));
+ tmp_thumb_path[sizeof(tmp_thumb_path) - 1] = '\0';
/* Request for thumb file to the daemon "Thumbnail generator" */
err = _media_thumb_request(THUMB_REQUEST_SAVE_FILE, thumb_type, origin_path, tmp_thumb_path, sizeof(tmp_thumb_path), &thumb_info);