diff options
author | Michael R Sweet <michaelrsweet@gmail.com> | 2019-05-17 07:53:30 -0400 |
---|---|---|
committer | Michael R Sweet <michaelrsweet@gmail.com> | 2019-05-17 07:53:30 -0400 |
commit | b761dd43be377613abd39ea82edd86d1b02deee6 (patch) | |
tree | 881f6516ea90b3fbdf0358e4f6fb27df249b0f8a /backend | |
parent | 7c11d5aea4d9ba596e71e82697bf28b0a00ea5fa (diff) | |
download | cups-b761dd43be377613abd39ea82edd86d1b02deee6.tar.gz |
Enforce USB read limits (Issue #5583)
Diffstat (limited to 'backend')
-rw-r--r-- | backend/usb-libusb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 7ec9a6d6e..87606ac13 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -1,9 +1,10 @@ /* * LIBUSB interface code for CUPS. * - * Copyright 2007-2015 by Apple Inc. + * Copyright 2007-2019 by Apple Inc. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ /* @@ -1742,8 +1743,7 @@ static void *read_thread(void *reference) * Make sure this loop executes no more than once every 250 miliseconds... */ - if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) && - (g.wait_eof || !g.read_thread_stop)) + if ((g.wait_eof || !g.read_thread_stop)) { gettimeofday(&now, NULL); if (timercmp(&now, &end, <)) |