Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: third_party/libusb/src/libusb/os/darwin_usb.c

Issue 23137025: Emergency fix for Mac: crash with EXC_ARITHMETIC in submit_bulk_transfer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libusb/darwin-sigfpe.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libusb/src/libusb/os/darwin_usb.c
diff --git a/third_party/libusb/src/libusb/os/darwin_usb.c b/third_party/libusb/src/libusb/os/darwin_usb.c
index a24558cb593b4ecdca032a45ddc8fcba7b0faabd..3f315e84be6e16a4c00c4c2f10fd1f27a8f4a13c 100644
--- a/third_party/libusb/src/libusb/os/darwin_usb.c
+++ b/third_party/libusb/src/libusb/os/darwin_usb.c
@@ -1448,8 +1448,14 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
cInterface = &priv->interfaces[iface];
- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
- &transferType, &maxPacketSize, &interval);
+ ret = (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
meacer 2013/08/23 16:57:27 GetPipeProperties are called twice more in this fi
Bei Zhang 2013/08/23 17:07:28 Other calls in this file doesn't seem to cause any
meacer 2013/08/23 17:10:04 Sounds good, thanks Bei.
+ &transferType, &maxPacketSize, &interval);
+
+ if (ret) {
+ usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (code = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
+ darwin_error_str(ret), ret);
+ return darwin_to_libusb (ret);
+ }
if (0 != (transfer->length % maxPacketSize)) {
/* do not need a zero packet */
« no previous file with comments | « third_party/libusb/darwin-sigfpe.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698