summaryrefslogtreecommitdiff
path: root/emulators/simh/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/simh/patches/patch-ac')
-rw-r--r--emulators/simh/patches/patch-ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/emulators/simh/patches/patch-ac b/emulators/simh/patches/patch-ac
new file mode 100644
index 00000000000..13f5904c89e
--- /dev/null
+++ b/emulators/simh/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.1 2002/10/19 21:38:10 thorpej Exp $
+
+*** PDP11/pdp11_xq.c.orig Sat Oct 19 14:29:44 2002
+--- PDP11/pdp11_xq.c Sat Oct 19 14:30:00 2002
+***************
+*** 766,771 ****
+--- 766,775 ----
+ if (xq.xbdl_buf[1] & XQ_DSC_H) b_length -= 1;
+ if (xq.xbdl_buf[1] & XQ_DSC_L) b_length -= 1;
+
++ /* protect ourselves from a broken device driver... */
++ if ((xq.write_buffer.len + b_length) > sizeof(xq.write_buffer.msg))
++ b_length = sizeof(xq.write_buffer.msg) - xq.write_buffer.len;
++
+ /* add to transmit buffer */
+ Map_ReadB(address, b_length, &xq.write_buffer.msg[xq.write_buffer.len], NOMAP);
+ xq.write_buffer.len += b_length;