From 1d992a6d1348016aa36ff3200c4278582058da2c Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Sat, 7 Nov 2015 10:52:58 +0100 Subject: [PATCH] helpers.cpp: Fix sscanf format string in getJFFS2MountPoint (THX Jacek) --- src/system/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 56983c9d0..a66f53e8c 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -913,7 +913,7 @@ std::string getJFFS2MountPoint(int mtdPos) char lineRead[1024], sMount[512], sFs[512]; memset(lineRead, '\0', sizeof(lineRead)); while (fgets(lineRead, sizeof(lineRead)-1, fd)) { - sscanf(lineRead, "/dev/mtdblock%d %512s %512s", &iBlock, sMount, sFs); + sscanf(lineRead, "/dev/mtdblock%d %511s %511s", &iBlock, sMount, sFs); if ((iBlock == mtdPos) && (strstr(sMount, "/") != NULL) && (strstr(sFs, "jffs2") != NULL)) { fclose(fd); return sMount;