summaryrefslogtreecommitdiff
path: root/cups/sidechannel.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-03-14 18:45:10 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-03-14 18:45:10 +0000
commitf14324a7920bee90b63469ce754e8040933f38e1 (patch)
tree0077407e46ff904efd4601b99932c9abfd894030 /cups/sidechannel.c
parentc8fef167ba1e9d5d87fc77e4e99ca12ba9384cbb (diff)
downloadcups-f14324a7920bee90b63469ce754e8040933f38e1.tar.gz
Merge changes from CUPS 1.5svn-r9602.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3046 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/sidechannel.c')
-rw-r--r--cups/sidechannel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cups/sidechannel.c b/cups/sidechannel.c
index 17abb2b3f..460eae351 100644
--- a/cups/sidechannel.c
+++ b/cups/sidechannel.c
@@ -3,7 +3,7 @@
*
* Side-channel API code for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -205,7 +205,7 @@ cupsSideChannelRead(
*/
if (buffer[0] < CUPS_SC_CMD_SOFT_RESET ||
- buffer[0] > CUPS_SC_CMD_SNMP_GET_NEXT)
+ buffer[0] >= CUPS_SC_CMD_MAX)
{
DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0]));
*command = CUPS_SC_CMD_NONE;
@@ -499,7 +499,7 @@ cupsSideChannelWrite(
* Range check input...
*/
- if (command < CUPS_SC_CMD_SOFT_RESET || command > CUPS_SC_CMD_SNMP_GET_NEXT ||
+ if (command < CUPS_SC_CMD_SOFT_RESET || command >= CUPS_SC_CMD_MAX ||
datalen < 0 || datalen > 16384 || (datalen > 0 && !data))
return (-1);