This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Implement strlcpy [BZ #178]


On Wed, 17 Sep 2014, Florian Weimer wrote:

> I misremembered what the GNU coding standards say about dynamically sized
> buffers.  As far as I can tell, they recommend it not in general, but only as
> a way to avoid unintentional copyright infringement.  That's why I didn't add
> a reference to the coding standards.

  @node Semantics
  @section Writing Robust Programs

  @cindex arbitrary limits on data
  Avoid arbitrary limits on the length or number of @emph{any} data
  structure, including file names, lines, files, and symbols, by allocating
  all data structures dynamically.  In most Unix utilities, ``long lines
  are silently truncated''.  This is not acceptable in a GNU utility.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]