#define PERM_LEN_DEC 4
#ifdef ARCH_64
#define ADDR_LEN 10
-#define ADDR_LEN_DOUBLE 20
-#define ADDR_LEN_DOUBLE_DEC 19
+#define ADDR_BUF_LEN 22
+#define ADDR_BUF_LEN_DEC 21
#else
#define ADDR_LEN 8
-#define ADDR_LEN_DOUBLE 16
-#define ADDR_LEN_DOUBLE_DEC 15
+#define ADDR_BUF_LEN 18
+#define ADDR_BUF_LEN_DEC 17
#endif
#define INFO_LEN 20
#define INFO_LEN_DEC 19
long *eaddr;
char perm[PERM_LEN];
char path[PATH_MAX + 1];
- char addr[ADDR_LEN * 2];
+ char addr[ADDR_BUF_LEN];
char linebuf[BUF_SIZE];
struct addr_node *head = NULL;
struct addr_node *tail = NULL;
/* parsing the maps to get executable code address */
while (fgets_fd(linebuf, BUF_SIZE, fd) != NULL) {
memset(path, 0, PATH_MAX + 1);
- result = sscanf(linebuf, STR_FS(ADDR_LEN_DOUBLE_DEC)
+ result = sscanf(linebuf, STR_FS(ADDR_BUF_LEN_DEC)
STR_FS(PERM_LEN_DEC)
"%*s %*s %*s"
STR_FS(PATH_MAX), addr, perm, path);