[Bug 998256] [NEW] regcomp fails with custom malloc

Robert Vollmert rob at krikkit.org
Fri May 11 22:17:15 UTC 2012


Public bug reported:

regcomp fails to compile the regular expression "^ " with memory error
if malloc(0) returns NULL. That's valid malloc behavior, compare
malloc(3).

I had a little trouble debugging, but I believe the problem lies with
posix/regex_internal.c:re_node_set_alloc being called with size == 0.

I'm attaching a test program that should exhibit the bug.

ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare.

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

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

Title:
  regcomp fails with custom malloc

Status in “eglibc” package in Ubuntu:
  New

Bug description:
  regcomp fails to compile the regular expression "^ " with memory error
  if malloc(0) returns NULL. That's valid malloc behavior, compare
  malloc(3).

  I had a little trouble debugging, but I believe the problem lies with
  posix/regex_internal.c:re_node_set_alloc being called with size == 0.

  I'm attaching a test program that should exhibit the bug.

  ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/998256/+subscriptions




More information about the foundations-bugs mailing list