Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 22:31:53 -0400 (EDT)
From:      Benjamin Kaduk <kaduk@MIT.EDU>
To:        "A.J. 'Fonz' van Werven" <freebsd@skysmurf.nl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Letting "ls -l" display file permissions in octal
Message-ID:  <alpine.GSO.1.10.1404082231310.21026@multics.mit.edu>
In-Reply-To: <20140408203913.GA2340@spectrum.skysmurf.nl>
References:  <20140408184533.GA974@spectrum.skysmurf.nl> <4e735f74795e7212dd3269ec6b0aaaf0.authenticated@ultimatedns.net> <20140408203913.GA2340@spectrum.skysmurf.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1404082231310.21026>