From 8e37c62b944cc92f24848c907024685ad0612d20 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 4 Jan 2019 11:14:52 +0100 Subject: [PATCH] mount: fix format overflow --- mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount.c b/mount.c index 1d581ea..26e416e 100644 --- a/mount.c +++ b/mount.c @@ -394,11 +394,12 @@ static char* mount_get_serial(char *dev) { int id; struct stat buf; - char tmp3[64]; + char tmp3[255]; int ret; *t = 0; id = atoi(namelist[n]->d_name); *t = ':'; + sprintf(tmp3, "/sys/bus/scsi/devices/%s/block:%s/", namelist[n]->d_name, dev); ret = stat(tmp3, &buf); if(ret) -- 2.30.2