diff options
-rwxr-xr-x | packaging/libmtp.spec | 2 | ||||
-rwxr-xr-x | src/libmtp.c | 10 | ||||
-rwxr-xr-x | util/mtp-probe.c | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/packaging/libmtp.spec b/packaging/libmtp.spec index 85ee85f..fcaa5fe 100755 --- a/packaging/libmtp.spec +++ b/packaging/libmtp.spec @@ -3,7 +3,7 @@ Name: libmtp Summary: Library for media transfer protocol (mtp) Version: 1.1.9 -Release: 9 +Release: 10 Group: Network & Connectivity/Other License: LGPL-2.1 Source0: libmtp-%{version}.tar.gz diff --git a/src/libmtp.c b/src/libmtp.c index 25b149b..0caec01 100755 --- a/src/libmtp.c +++ b/src/libmtp.c @@ -2919,6 +2919,11 @@ static int sort_storage_by(LIBMTP_mtpdevice_t *device,int const sortby) ptr1 = ptr1->next; } +#ifdef TIZEN_EXT + if(ptr2 == NULL) + return -1; +#endif + // Make our previous entries next point to our next if(ptr2->prev != NULL) { ptr1 = ptr2->prev; @@ -5514,9 +5519,10 @@ static char *generate_unique_filename(PTPParams* params, char const * const file if (check_filename_exists(params, filename)) { extension_position = strrchr(filename,'.'); +#ifdef TIZEN_EXT if (extension_position == NULL) return NULL; - +#endif char basename[extension_position - filename + 1]; strncpy(basename, filename, extension_position - filename); basename[extension_position - filename] = '\0'; @@ -9273,4 +9279,4 @@ int LIBMTP_Get_Num_Objects(LIBMTP_mtpdevice_t *device, uint32_t format, uint32_t return 0; } -#endif /* TIZEN_EXT */
\ No newline at end of file +#endif /* TIZEN_EXT */ diff --git a/util/mtp-probe.c b/util/mtp-probe.c index e3ae3b7..cfa14c5 100755 --- a/util/mtp-probe.c +++ b/util/mtp-probe.c @@ -186,7 +186,9 @@ static int check_interface(char *sysfspath) /* Check for dirs that identify endpoints */ ret = regcomp(&r, "^ep_[0-9a-f]+$", REG_EXTENDED | REG_NOSUB); if (ret) { +#ifdef TIZEN_EXT closedir(dir); +#endif return -1; } |