[PATCH usbredir 8/8] Use a smaller buffer to Skip forward in error conditions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The kernel limits stack size to 2048, so using a large local
variable does not work there.

This only happens in error conditions, and should not make
a material difference to the non kernel cases.

Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 usbredirparser/usbredirparser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index 6d8735d..7f5d586 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -955,7 +955,7 @@ int usbredirparser_do_read(struct usbredirparser *parser_pub)
 
     /* Skip forward to next packet (only used in error conditions) */
     while (parser->to_skip > 0) {
-        uint8_t buf[65536];
+        uint8_t buf[512];
         r = (parser->to_skip > sizeof(buf)) ? sizeof(buf) : parser->to_skip;
         r = parser->callb.read_func(parser->callb.priv, buf, r);
         if (r <= 0)
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]