- Svace ID : 79264, 151370
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: Icbc92de21d7187ece2667d80c7e21c2ba2712016
return -2;
}
- if (offset >> 32 != 0) {
- add_error_to_errorstack(device, LIBMTP_ERROR_GENERAL,
- "LIBMTP_GetPartialObject: PTP_OC_GetPartialObject only supports 32bit offsets");
- return -3;
- }
-
ret = ptp_getpartialobject(params, id, offset, maxbytes, data, size);
if (ret == PTP_RC_OK)
return 0;
// set the next pointer at the end
// if there is any list
- if(head != NULL)
+ if(head != NULL && tail != NULL)
tail->next = NULL;
// return the head of the list (NULL if no list)
if (mask & CANON_EOS_OLC_BUTTON) {
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
ce[i].u.info = malloc(strlen("Button 1234567"));
- sprintf(ce[i].u.info, "Button %d", dtoh16a(curdata+curoff));
+ snprintf(ce[i].u.info, strlen("Button 1234567"), "Button %d", dtoh16a(curdata+curoff));
i++;
curoff += 2;
}