[PATCH] CIFS: Fix IP address bounds checking on mount utility.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Scott Lovenberg <scott.lovenberg@xxxxxxxxx>

Signed-off-by: Scott Lovenberg <scott.lovenberg@xxxxxxxxx>
---
 mount.cifs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mount.cifs.c b/mount.cifs.c
index a9632b4..f63c309 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -941,8 +941,8 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
 			if (!value || !*value) {
 				fprintf(stderr,
 					"target ip address argument missing\n");
-			} else if (strnlen(value, MAX_ADDRESS_LEN) <=
-				MAX_ADDRESS_LEN) {
+			} else if (strnlen(value, MAX_ADDR_LIST_LEN + 1) <=
+				MAX_ADDR_LIST_LEN) {
 				strcpy(parsed_info->addrlist, value);
 				if (parsed_info->verboseflag)
 					fprintf(stderr,
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux