diff options
author | 2016-11-26 22:36:49 -0500 | |
---|---|---|
committer | 2016-11-26 22:36:49 -0500 | |
commit | fe581f7555f39140cbfac05d8fbccc1ef25eba0e (patch) | |
tree | 2cc1df580a5a88c960550087870e35bf60cace87 /scanmacho.c | |
parent | scanelf: rewrite textrels decoder to use program segments (diff) | |
download | pax-utils-fe581f7555f39140cbfac05d8fbccc1ef25eba0e.tar.gz pax-utils-fe581f7555f39140cbfac05d8fbccc1ef25eba0e.tar.bz2 pax-utils-fe581f7555f39140cbfac05d8fbccc1ef25eba0e.zip |
scanmacho: fix 126 byte limit on -E option
Diffstat (limited to 'scanmacho.c')
-rw-r--r-- | scanmacho.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scanmacho.c b/scanmacho.c index 30ee730..71b1593 100644 --- a/scanmacho.c +++ b/scanmacho.c @@ -25,7 +25,7 @@ static void usage(int status); static int parseargs(int argc, char *argv[]); /* variables to control behavior */ -static char match_etypes[126] = ""; +static const char *match_etypes = NULL; static char scan_envpath = 0; static char scan_symlink = 1; static char scan_archives = 0; @@ -348,7 +348,7 @@ static int scanmacho_fat(const char *filename, int fd, size_t len) default: break; } - if (strlen(match_etypes)) { + if (match_etypes) { char sbuf[128]; char ftype[32]; @@ -640,7 +640,7 @@ static int parseargs(int argc, char *argv[]) from_file = optarg; break; case 'E': - strncpy(match_etypes, optarg, sizeof(match_etypes)); + match_etypes = optarg; break; case 'M': match_bits = atoi(optarg); |