#define STR_ANONY "[anony]"
#define STR_ANONY_LEN 8
+#define STR_FS(length) "%"#length"s"
+
static FILE *outputfile = NULL; ///< global output stream
static FILE *errfile = NULL; ///< global error stream
static FILE *bufferfile = NULL; ///< buffer file for ordering
/* parsing the maps to get executable code address */
while (fgets_fd(linebuf, BUF_SIZE, fd) != NULL) {
memset(path, 0, PATH_MAX);
- result = sscanf(linebuf, "%34s %5s %*s %*s %*s %256s ", addr, perm, path);
+ result = sscanf(linebuf, STR_FS(sizeof(addr)-1)
+ STR_FS(sizeof(perm)-1)
+ "%*s %*s %*s"
+ STR_FS(sizeof(path)-1), addr, perm, path);
if (result < 0)
continue;
perm[PERM_LEN - 1] = 0;