patch crashes if non-numerical parameter for strip count

Bug #1245429 reported by Aapo Rantalainen
6
This bug affects 1 person
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_iterator_inline (list=0x0) at ../lib/gl_list.h:762
#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=format@entry=0x418162 "%s %s is not a number") at util.c:921
#5 0x0000000000405d6b in numeric_string (string=<optimized out>, negative_allowed=negative_allowed@entry=false,
    argtype_msgid=argtype_msgid@entry=0x41831f "strip count") at patch.c:1077
#6 0x00000000004028c5 in get_some_switches () at patch.c:927
#7 main (argc=<optimized out>, argv=<optimized out>) at patch.c:156

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.