Skip to content

Commit

Permalink
Enforce USB read limits (Issue #5583)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael R Sweet committed May 17, 2019
1 parent 7c11d5a commit b761dd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
CHANGES - 2.3rc1 - 2019-05-15
CHANGES - 2.3rc1 - 2019-05-17
=============================


Changes in CUPS v2.3rc1
-----------------------

- The `cups-config` script no longer puts non-CUPS libraries when they are not
needed (Issue #5261)
- The `cups-config` script no longer adds extra libraries when linking against
shared libraries (Issue #5261)
- The supplied example print documents have been optimized for size
(Issue #5529)
- The `cupsctl` command now prevents setting "cups-files.conf" directives
(Issue #5530)
- The "forbidden" message in the web interface is now explained (Issue #5547)
- The footer in the web interface covered some content on small displays
(Issue #5574)
- The `cups-config` script no longer adds extra libraries when linking against
shared libraries (Issue #5261)
- The libusb-based USB backend now enforces read limits, improving print speed
in many cases (Issue #5583)
- The `ippeveprinter` command now looks for print commands in the "command"
subdirectory.
- The `ipptool` command now supports `$date-current` and `$date-start` variables
Expand Down
8 changes: 4 additions & 4 deletions backend/usb-libusb.c
Original file line number Diff line number Diff line change
@@ -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.
*/

/*
Expand Down Expand Up @@ -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, <))
Expand Down

0 comments on commit b761dd4

Please sign in to comment.