patch crashes if non-numerical parameter for strip count
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
patch (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
GNU patch 2.7.1
E.g.
patch -pa
It gives correct warning
patch: **** strip count s is not a number
But then it crashes with segmentation fault:
(gdb) bt
#0 gl_list_
#1 forget_output_files () at patch.c:1935
#2 cleanup () at patch.c:1978
#3 0x0000000000406a78 in fatal_exit (sig=sig@entry=0) at patch.c:1953
#4 0x000000000040c7b2 in fatal (format=
#5 0x0000000000405d6b in numeric_string (string=<optimized out>, negative_
argtype_
#6 0x00000000004028c5 in get_some_switches () at patch.c:927
#7 main (argc=<optimized out>, argv=<optimized out>) at patch.c:156