Re: Letting "ls -l" display file permissions in octal
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"
討論串 (同標題文章)
完整討論串 (本文為第 4 之 4 篇):