mem_linux.cc:70:20: error: Width 256 given in format string (no. 1) is larger than destination buffer 'label[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth]
and
mem_linux.cc:70:20: error: Width 8 given in format string (no. 3) is larger than destination buffer 'unit[8]', use %7s to prevent overflowing it. [invalidScanfFormatWidth]
static analyser cppcheck says:
mem_linux.cc:70:20: error: Width 256 given in format string (no. 1) is larger than destination buffer 'label[256]', use %255s to prevent overflowing it. [invalidScanfFormatWidth]
and
mem_linux.cc:70:20: error: Width 8 given in format string (no. 3) is larger than destination buffer 'unit[8]', use %7s to prevent overflowing it. [invalidScanfFormatWidth]
Source code is