From 840c8c353931bf7f1a623119e1b8532a1cd7c73f Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 16 Jan 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-01-16 --- port/cis.c | 3 ++- port/unthwack.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/port/cis.c b/port/cis.c index 9f3b8ef59745a8cfdde933f88f47b2dd95c565de..0cf824c44d2c4751c19b38b8dd8c7d977d0f46fd 100644 --- a/port/cis.c +++ b/port/cis.c @@ -214,7 +214,8 @@ nanoamps(Cisdat *cis) } /* - * only nominal voltage is important for config + * only nominal voltage (feature 1) is important for config, + * other features must read card to stay in sync. */ static ulong power(Cisdat *cis) diff --git a/port/unthwack.c b/port/unthwack.c index 4ea74af18be783ac1bb1aad47cdfc2f8cf7e37fd..f0faae362a7be898129e882b0a76d3d14cd7c068 100644 --- a/port/unthwack.c +++ b/port/unthwack.c @@ -168,6 +168,8 @@ unthwack(Unthwack *ut, uchar *dst, int ndst, uchar *src, int nsrc, ulong seq) lit = (lit - 64) & 0xff; } } + if(d >= dmax) + return -1; *d++ = lit; lithist = (lithist << 1) | (lit < 32) | (lit > 127); blocks->maxoff++;