X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=regress%2Fhfuzz.c;h=467f0251e46274f7331199dac6fb4fc79ee10809;hb=814cee186999a6e9a76ab970f891347c1e42b132;hp=c260d0df7692b6e9ff13e825a3b2c700be4659fc;hpb=ab178bf5668bd5bf1a4ca475e1b0edac60da5ebc;p=adns.git diff --git a/regress/hfuzz.c b/regress/hfuzz.c index c260d0d..467f025 100644 --- a/regress/hfuzz.c +++ b/regress/hfuzz.c @@ -86,7 +86,7 @@ int Ttestinputfd(void) { void Texit(int rv) { fprintf(stderr,"**Texit(%d)**\n",rv); - Tallocshutdown(); + Tcommonshutdown(); exit(0); } @@ -121,8 +121,11 @@ int main(int argc, char **argv) { if (dup2(fileno(t_stdin), 0)) baile("dup2 t_stdin"); if (fseek(stdin, 0, SEEK_SET)) baile("rewind t_stdin"); - if (dup2(1,2)!=2) baile("redirect stderr to stdout"); - int estatus = Hmain(t_argc, t_argv); Texit(estatus); } + +void Tmallocshutdown(void) { } +void *Hmalloc(size_t s) { assert(s); return malloc(s); } +void *Hrealloc(void *p, size_t s) { assert(s); return realloc(p,s); } +void Hfree(void *p) { free(p); }