diff options
Diffstat (limited to 'examples/pathutils.c')
-rwxr-xr-x | examples/pathutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/pathutils.c b/examples/pathutils.c index 419a543..c51214c 100755 --- a/examples/pathutils.c +++ b/examples/pathutils.c @@ -42,7 +42,7 @@ lookup_folder_id (LIBMTP_folder_t * folder, char * path, char * parent) } current = malloc (strlen(parent) + strlen(folder->name) + 2); - sprintf(current,"%s/%s",parent,folder->name); + snprintf(current,strlen(parent)+strlen(folder->name)+1,"%s/%s",parent,folder->name); if (strcasecmp (path, current) == 0) { free (current); return folder->folder_id; |