cvs commit: src/lib/libc/stdlib malloc.c

Colin Percival cperciva at
Sun Aug 13 21:54:48 UTC 2006

cperciva    2006-08-13 21:54:47 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdlib      malloc.c 
  Correctly handle the case in calloc(num, size) where
    (size_t)(num * size) == 0
  but both num and size are nonzero.
  Reported by:    Ilja van Sprundel
  Approved by:    jasone
  Security:       Integer overflow; calloc was allocating 1 byte in
                  response to a request for a multiple of 2^32 (or 2^64)
                  bytes instead of returning NULL.
  Revision  Changes    Path
  1.134     +1 -1      src/lib/libc/stdlib/malloc.c

More information about the cvs-src mailing list