From b59fb9cda4abe138e3a6e474d3820db42758b4d8 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 7 Nov 2015 10:52:58 +0100 Subject: [PATCH] helpers.cpp: Fix sscanf format string in getJFFS2MountPoint (THX Jacek) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1d992a6d1348016aa36ff3200c4278582058da2c Author: Michael Liebmann Date: 2015-11-07 (Sat, 07 Nov 2015) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- 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;