shithub: riscv

Download patch

ref: 4834c3c19f7c6b557a3f97fb9827e532dd4d2fe0
parent: 4cdf05391aa8e0aa300c2fc4c0ad49003b8989d8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Mar 27 17:14:41 EDT 2024

devuart: dont allow ridiculous queue sizes

--- a/sys/src/9/port/devuart.c
+++ b/sys/src/9/port/devuart.c
@@ -499,6 +499,8 @@
 			break;
 		case 'Q':
 		case 'q':
+			if(n < 0 || n > 1024*1024)
+				return -1;
 			if(p->iq != nil)
 				qsetlimit(p->iq, n);
 			if(p->oq != nil)