Re: Letting "ls -l" display file permissions in octal

看板FB_hackers作者時間11年前 (2014/04/09 11:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
On Tue, 8 Apr 2014, A.J. 'Fonz' van Werven wrote: > Please note: someone else on the forums spotted a bug in my code: the > snprintf() call in octalmode() in print.c uses sizeof, which actually > refers to the size of the pointer rather than the size of the buffer > itself. I've updated the patch to just use the literal value 6 instead > (four octal digits, a space reserved for aclmode() and a terminating \0). > Since the length of said buffer has been hardcoded to 20 in the calling > function (I didn't do that, BTW), I think that should be ok. If you have a version of the patch that you're happy with, it's probably worth submitting it in a PR so that it doesn't get lost. -Ben Kaduk _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1JHBVkz4 (FB_hackers)
文章代碼(AID): #1JHBVkz4 (FB_hackers)