Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Jason Molenda via lldb-commits
Hi Adrian, These are good points, thanks for the feedback. debugserver is unique in the code base in that it only builds on darwin targets. Originally it was intended to be a generic standalone gdb-remote protocol stub implementation, but it was only ever implemented for macos and for that m

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Joerg Sonnenberger via lldb-commits
On Sat, Dec 09, 2017 at 03:37:09AM -, Jason Molenda via lldb-commits wrote: > Log: > Change uses of strncpy in debugserver to strlcpy > for better safety. I don't think this is an improvement really. Many of those should be plain memcpy or protected against truncation. Joerg _

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Adrian McCarthy via lldb-commits
I have some concerns about this change. 1. strlcpy is not a C++ standard function, so it's not available for non-POSIX targets. As far as I can tell, this is the first use of strlcpy in LLVM. 2. In some of the changed calls, the buffer size argument still has a -1, which is redundant with what

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-10 Thread Davide Italiano via lldb-commits
On Fri, Dec 8, 2017 at 7:37 PM, Jason Molenda via lldb-commits wrote: > Author: jmolenda > Date: Fri Dec 8 19:37:09 2017 > New Revision: 320242 > > URL: http://llvm.org/viewvc/llvm-project?rev=320242&view=rev > Log: > Change uses of strncpy in debugserver to strlcpy > for better safety. > > > T

[Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-08 Thread Jason Molenda via lldb-commits
Author: jmolenda Date: Fri Dec 8 19:37:09 2017 New Revision: 320242 URL: http://llvm.org/viewvc/llvm-project?rev=320242&view=rev Log: Change uses of strncpy in debugserver to strlcpy for better safety. Modified: lldb/trunk/tools/debugserver/source/DNB.cpp lldb/trunk/tools/debugserver/