Package: patch

The attached files seem to be getting patch into an infinite loop
condition (or taking way too much time to run)

patch util.h -i loop.patch

I don't think this log is very useful but I ran it and paused it twice
to check backtrace :

user@user-box:~/patch/patch-2.7.1/src$ gdb ./patch
..
(gdb) run /home/user/Desktop/loop/util.h -i /home/user/Desktop/loop/loop.patch
Starting program: /home/user/patch/patch-2.7.1/src/patch
/home/user/Desktop/loop/util.h -i /home/user/Desktop/loop/loop.patch
patching file /home/user/Desktop/loop/util.h
<it keeps running for a while>
^C
Program received signal SIGINT, Interrupt.
0x0805b0bd in patch_match (base=12884901888, offset=-409342277,
prefix_fuzz=99999723552768, suffix_fuzz=0) at patch.c:1667
1667    }
(gdb) bt
#0  0x0805b0bd in patch_match (base=12884901888, offset=-409342277,
prefix_fuzz=99999723552768, suffix_fuzz=0) at patch.c:1667
#1  0x0805ba9d in locate_hunk (fuzz=<optimized out>) at patch.c:1170
#2  0x0804c6f1 in main (argc=4, argv=0xbffff064) at patch.c:402
#3  0xb7e2da83 in __libc_start_main (main=0x8049f60 <main>, argc=4,
argv=0xbffff064, init=0x80c12a0 <__libc_csu_init>, fini=0x80c1310
<__libc_csu_fini>, rtld_fini=0xb7fed130 <_dl_fini>,
    stack_end=0xbffff05c) at libc-start.c:287
#4  0x08053431 in _start ()
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x08056159 in ifetch (line=-4611707424544391168, whichbuf=<optimized
out>, psize=0xff88358f) at inp.c:453
453        *psize = 0;
(gdb) bt
#0  0x08056159 in ifetch (line=-4611707424544391168,
whichbuf=<optimized out>, psize=0xff88358f) at inp.c:453
#1  0x00000003 in ?? ()
(gdb)

I came across this one using lcamtuf's afl fuzzer.

Attachment: loop.tar.gz
Description: GNU Zip compressed data

Reply via email to