Re: strcpy -> strlcpy?

看板DFBSD_kernel作者時間21年前 (2005/01/02 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/13 (看更多)
:Is it worth changing strcpy to strlcpy? : :style(9) mentions this only for new code but it would be quite easy to :fix the tree (as OpenBSD has). : :Cheers : :Steve I think the answer is 'yes', because it makes audits easier, but it's also very easy to make mistakes when doing such conversions (e.g. like accidently using sizeof(variable) where variable is a pointer rather then a buffer), so any such patches would have to be carefully reviewed. Feed them slowly :-) -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #11rlgq00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11rlgq00 (DFBSD_kernel)