Date: Tue, 8 Apr 2014 22:39:13 +0200 From: "A.J. 'Fonz' van Werven" <freebsd@skysmurf.nl> To: freebsd-hackers@freebsd.org Subject: Re: Letting "ls -l" display file permissions in octal Message-ID: <20140408203913.GA2340@spectrum.skysmurf.nl> In-Reply-To: <4e735f74795e7212dd3269ec6b0aaaf0.authenticated@ultimatedns.net> References: <20140408184533.GA974@spectrum.skysmurf.nl> <4e735f74795e7212dd3269ec6b0aaaf0.authenticated@ultimatedns.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. AvW --=20 I'm not completely useless, I can be used as a bad example. --azLHFNyN32YCQGCU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTRF5xAAoJEAfP7gJTaCe84nsQAK2h7MNuFe8LfHHlmnAK3rCh 5wLe9P/mEUV72APGLMs9xpZ7E/lC8IyRLJhqsKTHiFWEUyLNkt8TCIpzzgAaMxN+ wcQdl44USYIBg65CW2uAqW9vTd/1y7bap5ameDdFUlD1Q9SYRraEK9pF1PSn8xZ9 vsc1C+WN24D3+OCGhWI8XuoHuOem0njptp2ZXJDqaKvoJmlQfEPXbgh5zt7OXXED EiEvK0pQleH1wJEwEnyiqOt1fCjrKh0Ot7DFP0yNhO2YoOR5NZC/Kn8uL4zuzLpW Qug5pfn9lMGLPGqrh+gBp1Cz1Q5ycM5aY/xykF37e8MizSJleExYjM3tEdZQCtgZ 9kLcNK71CupvsoD1/p/W9GuUUZq7RqCMkClsXT3Bns09fNtoPHEJ7n/iTm9QAIKx CvjmAbhS2/jL0KB50I8r5uLkSmt6/j5HBBtcNhW5u35KzmDvAXqEYfpaZM0pBVns 99hUOvCPdGrLgdW43J0lEwBILteYnsioihfPJBr/y2uBB+G57+liizGAxyNZ7i0o dzqOQ5FIOMu/BlWEKJyYq7TL1vNfwnlTQIi7zsUBxtK5MUOZDayiPCiU2WYz3Ztt dzv1jQcogaKm+FBIGW4ktfqGTlmdH2lGP9jH8OLgqKGAj2FaWna9OS1iiH78hx72 UqztAvE+Y0mt5CU2jhKG =rNsJ -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140408203913.GA2340>