diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-22 16:17:54 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-22 16:17:58 +0200 |
commit | 6a3dfd4614e76184224d807ab53556a7010b7947 (patch) | |
tree | e573d8fc2a75ab201bc30ff0cc8198ee744d3666 /fuzz | |
parent | 356674a7ceaa4c4ecb3f478d0d3b3cc682a1540c (diff) | |
download | gnutls-6a3dfd4614e76184224d807ab53556a7010b7947.tar.gz |
fuzz: work-around libtool file nametmp-fuzz-updates
fuzzers utilize argv[0] to discover the name the reproducers are stored
in. However libtool creates a script which later runs the executable.
Try to detect that situation and use the right paths.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fuzz/main.c b/fuzz/main.c index 19e5ca3dfc..5ef0b99e1c 100644 --- a/fuzz/main.c +++ b/fuzz/main.c @@ -85,6 +85,11 @@ int main(int argc, char **argv) target = target ? target + 1 : argv[0]; char corporadir[sizeof(SRCDIR) + 1 + strlen(target) + 8]; + + if (strncmp(target, "lt-", 3) == 0) { + target += 3; + } + snprintf(corporadir, sizeof(corporadir), SRCDIR "/%s.in", target); test_all_from(corporadir); |