new package: zzuf

This commit is contained in:
Tee KOBAYASHI 2022-02-06 11:56:14 +09:00 committed by xtkoba
parent 57c85cf5d2
commit 339ef85899
3 changed files with 54 additions and 0 deletions

26
packages/zzuf/build.sh Normal file
View File

@ -0,0 +1,26 @@
TERMUX_PKG_HOMEPAGE=http://caca.zoy.org/wiki/zzuf
TERMUX_PKG_DESCRIPTION="A transparent application input fuzzer"
TERMUX_PKG_LICENSE="WTFPL"
TERMUX_PKG_MAINTAINER="@termux"
_COMMIT=e598eef77a98d77dc6aec6fd2c845e3cd07dc4fd
TERMUX_PKG_VERSION=2019.02.08
TERMUX_PKG_SRCURL=https://github.com/samhocevar/zzuf.git
TERMUX_PKG_GIT_BRANCH=master
termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
echo " is different from what is expected to be: \"$version\""
return 1
fi
}
termux_step_pre_configure() {
autoreconf -fi
CPPFLAGS+=" -D__USE_GNU"
}

View File

@ -0,0 +1,17 @@
--- a/src/zzat.c
+++ b/src/zzat.c
@@ -51,6 +51,14 @@
#include "util/getopt.h"
+#if defined HAVE___FREAD_CHK
+extern size_t __fread_chk(void *ptr, size_t ptrlen, size_t size,
+ size_t nmemb, FILE *stream);
+#endif
+#if defined HAVE___FGETS_CHK
+char *__fgets_chk(char *s, size_t ptrlen, int size, FILE *stream);
+#endif
+
static int run(char const *sequence, char const *file);
static void output(char const *buf, size_t len);

View File

@ -0,0 +1,11 @@
--- a/src/zzuf.c
+++ b/src/zzuf.c
@@ -748,7 +748,7 @@
char *tmpdir;
tmpdir = getenv("TEMP");
if (!tmpdir || !*tmpdir)
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
int k = 0, extlen;