Hi,
commit 9bc39283e4cc6ab9e5913ccbf766998eab4ff093 introduced a bug,
where wrong struct is passed to sizeof in rmt_ioctl__

# mt --rsh-command=/usr/bin/ssh -f root@smp001-10:/dev/nst0 status
mt: root@smp001-10:/dev/nst0: Value too large for defined data type

-- 
Vita Cizek
From 745c8b73a090144fa24056d20e9d97314f41426d Mon Sep 17 00:00:00 2001
From: Vitezslav Cizek <[email protected]>
Date: Tue, 30 Jul 2013 15:24:22 +0200
Subject: [PATCH] paxutils: fix a size check in rmt_ioctl__

---
 lib/rtapelib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rtapelib.c b/lib/rtapelib.c
index 7213031..ac742b0 100644
--- a/lib/rtapelib.c
+++ b/lib/rtapelib.c
@@ -711,7 +711,7 @@ rmt_ioctl__ (int handle, int operation, char *argument)
 	    || (status = get_status (handle), status == -1))
 	  return -1;
 
-	if (status > sizeof (struct mtop))
+	if (status > sizeof (struct mtget))
 	  {
 	    errno = EOVERFLOW;
 	    return -1;
-- 
1.8.1.4

Attachment: signature.asc
Description: Digital signature

Reply via email to