[haiku-bugs] Re: [Haiku] #10223: Fixed possibly not null-terminated strings

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Tue, 19 Nov 2013 17:49:47 -0000

#10223: Fixed possibly not null-terminated strings
-------------------------+------------------------------
   Reporter:  Ezodev     |      Owner:  nobody
       Type:  bug        |     Status:  new
   Priority:  normal     |  Milestone:  R1
  Component:  - General  |    Version:  R1/Development
 Resolution:             |   Keywords:  gci2013 coverity
 Blocked By:             |   Blocking:
Has a Patch:  1          |   Platform:  All
-------------------------+------------------------------

Comment (by bonefish):

 The preferred solution would be to simply use `strlcpy()` instead of
 `strncpy()`.

 BTW, `NULL` is the null pointer. For the nul character `'\0'` should be
 used.

--
Ticket URL: <http://dev.haiku-os.org/ticket/10223#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: