* Version 1.3.4 (unreleased)
+** Fix crash on Mac OS X.
+Reported by rosmiitto in Issue #6:
+<http://code.google.com/p/yubikey-personalization/issues/detail?id=6>.
+
** Fix bug that prevented salting during AES key generation
** from passwords from working. Reported by Ben.
int _ykusb_read(void *dev, int report_type, int report_number,
char *buffer, int size)
{
+ CFIndex sizecf = (CFIndex)size;
+
if (report_type != REPORT_TYPE_FEATURE)
{
yk_errno = YK_ENOTYETIMPL;
return 0;
}
- _ykusb_IOReturn = IOHIDDeviceGetReport( dev, kIOHIDReportTypeFeature, report_number, (uint8_t *)buffer, (CFIndex *) &size );
+ _ykusb_IOReturn = IOHIDDeviceGetReport( dev, kIOHIDReportTypeFeature, report_number, (uint8_t *)buffer, (CFIndex *) &sizecf );
if ( _ykusb_IOReturn != kIOReturnSuccess )
{
yk_errno = YK_EUSBERR;
return 0;
}
-
- return size;
+
+ return (int)sizecf;
}
int _ykusb_write(void *dev, int report_type, int report_number,