From 37f0e1e025ab4c31f28da0240f15fa86beaf258a Mon Sep 17 00:00:00 2001 From: Artur Wojcik Date: Thu, 10 Dec 2009 12:03:40 -0700 Subject: [PATCH] Fix for buffer overflow error. Array index of 'device' may be out of bounds. Array 'device' of size 40 may use index value(s) 0..43. Signed-off-by: Artur Wojcik Signed-off-by: Dan Williams --- platform-intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-intel.c b/platform-intel.c index b21ff075..1516d631 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -206,7 +206,7 @@ const struct imsm_orom *find_imsm_orom(void) char *devt_to_devpath(dev_t dev) { - char device[40]; + char device[46]; sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev)); return canonicalize_file_name(device); -- 2.39.2