aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2000-02-12 01:14:33 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2000-02-12 01:14:33 +0000
commitf08566c3cf1af0a470cdefdd90081c45686804dd (patch)
treee3d5d065adf539d7de50f82ea269be2c13f10d04
parent327a542d35a5db57d7ebbb8e09856f735572a8f2 (diff)
Notes
-rw-r--r--usr.sbin/rmt/rmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c
index 1a536aa61de99..accebc674c6dd 100644
--- a/usr.sbin/rmt/rmt.c
+++ b/usr.sbin/rmt/rmt.c
@@ -184,9 +184,11 @@ top:
if (ioctl(tape, MTIOCGET, (char *)&mtget) < 0)
goto ioerror;
rval = sizeof (mtget);
+ if (rval > 24) /* original mtget structure size */
+ rval = 24;
(void)sprintf(resp, "A%d\n", rval);
(void)write(1, resp, strlen(resp));
- (void)write(1, (char *)&mtget, sizeof (mtget));
+ (void)write(1, (char *)&mtget, rval);
goto top;
}