[Bug 1245429] [NEW] patch crashes if non-numerical parameter for strip count

Aapo Rantalainen 1245429 at bugs.launchpad.net
Mon Oct 28 10:52:39 UTC 2013


Public bug reported:

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 at entry=0) at patch.c:1953
#4  0x000000000040c7b2 in fatal (format=format at entry=0x418162 "%s %s is not a number") at util.c:921
#5  0x0000000000405d6b in numeric_string (string=<optimized out>, negative_allowed=negative_allowed at entry=false, 
    argtype_msgid=argtype_msgid at 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

** Affects: patch (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to patch in Ubuntu.
https://bugs.launchpad.net/bugs/1245429

Title:
  patch crashes if non-numerical parameter for strip count

Status in “patch” package in Ubuntu:
  New

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 at entry=0) at patch.c:1953
  #4  0x000000000040c7b2 in fatal (format=format at entry=0x418162 "%s %s is not a number") at util.c:921
  #5  0x0000000000405d6b in numeric_string (string=<optimized out>, negative_allowed=negative_allowed at entry=false, 
      argtype_msgid=argtype_msgid at 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 manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/patch/+bug/1245429/+subscriptions



More information about the foundations-bugs mailing list