From 18c3e243414ebcaac3603a86e9ac55c232715fd8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 29 Apr 2009 14:17:39 +0200 Subject: [PATCH] blockdev: fix possible buffer overflow Signed-off-by: Karel Zak --- disk-utils/blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 3f9e81d24..7d1f8086c 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -313,7 +313,7 @@ report_all_devices(void) { } while (fgets(line, sizeof(line), procpt)) { - if (sscanf (line, " %d %d %d %[^\n ]", + if (sscanf (line, " %d %d %d %200[^\n ]", &ma, &mi, &sz, ptname) != 4) continue;