diff --git a/generators/compact.c b/generators/compact.c index a087da2b1974f5633084675cdd73e78c6d74ca2f..dc7e4d1b61f179c4f2eef39db636742abe9fd46f 100644 --- a/generators/compact.c +++ b/generators/compact.c @@ -392,7 +392,7 @@ int generator(int dirfd, int pos, struct list_head *head_in, continue; if (path_list_ext) { - st.st_mode = atoi(cur->attrs[1]); + st.st_mode = strtol(cur->attrs[1], NULL, 10); st.st_uid = 0; pwd = getpwnam(cur->attrs[2]); if (pwd) diff --git a/generators/unknown.c b/generators/unknown.c index aed7c4878ee12fc91a0e08b8930b99cb75364e1c..03d71f8db4b8b5249eb9803ac99eb9df67a0f6da 100644 --- a/generators/unknown.c +++ b/generators/unknown.c @@ -397,7 +397,7 @@ int generator(int dirfd, int pos, struct list_head *head_in, continue; if (path_list_ext) { - st.st_mode = atoi(cur->attrs[1]); + st.st_mode = strtol(cur->attrs[1], NULL, 10); st.st_uid = 0; pwd = getpwnam(cur->attrs[2]); if (pwd) diff --git a/src/gen_digest_lists.c b/src/gen_digest_lists.c index 333d655c8def2ee58c1429d3e57c97de2b3c035b..0847cbcc610733d566bbc98a47d6d9eadc9828e8 100644 --- a/src/gen_digest_lists.c +++ b/src/gen_digest_lists.c @@ -215,7 +215,7 @@ int main(int argc, char **argv) } break; case 'p': - pos = atoi(optarg); + pos = strtol(optarg, NULL, 10); break; case 't': for (i = 0; i < COMPACT__LAST; i++)