commit: fe581f7555f39140cbfac05d8fbccc1ef25eba0e
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 27 03:36:49 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Nov 27 03:36:49 2016 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=fe581f75
scanmacho: fix 126 byte limit on -E option
scanmacho.c | 6 +++---
1 file 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);