Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 2009 19:43:36 +0000 (UTC)
From:      David Schultz <das@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/lib/libc/stdio getdelim.c
Message-ID:  <200910041943.n94JhonY044820@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
das         2009-10-04 19:43:36 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdio       getdelim.c 
  Log:
  SVN rev 197752 on 2009-10-04 19:43:36Z by das
  
  Better glibc compatibility for getline/getdelim:
  
  - Tolerate applications that pass a NULL pointer for the buffer and
    claim that the capacity of the buffer is nonzero.
  
  - If an application passes in a non-NULL buffer pointer and claims the
    buffer has zero capacity, we should free (well, realloc) it
    anyway. It could have been obtained from malloc(0), so failing to
    free it would be a small memory leak.
  
  MFC After:      2 weeks
  Reported by:    naddy
  PR:             ports/138320
  
  Revision  Changes    Path
  1.3       +2 -2      src/lib/libc/stdio/getdelim.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910041943.n94JhonY044820>