[lkml]   [2013]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] doc: avoid strncpy in accounting tool
Kees Cook <> writes:

> Avoid strncpy anti-pattern. Use strdup() instead, as already done for
> the logfile optarg.

There should be no need to copy the string, option arguments are stable.


Andreas Schwab,
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."

 \ /
  Last update: 2013-06-06 19:41    [W:0.084 / U:2.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site