tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Updating syslog(3), syslogd(8) to support RFC-5424



On Sat, Mar 19, 2011 at 09:41:15AM +0100, Marc Balmer wrote:
> 
> I agree that syslog should just log what it gets and not fiddle to much
> with it.  fwiw, removing the "c &= 0177" is not enough, since some UTF-8
> characters trigger the "iscntrl()" path.  E.g. the latin small letter a
> with diaeresis is 0xc3 0xa4 and iscntrl() returns true for 0xc3.  So the
> whole loop needs to be a bit rearranged.

Except that you'd need a CBU (crystal ball unit) to determine whether
anything further down the line would treat a value 0x80-0x9f as a
control char or part of a UTF-8 sequence.

UTF-8 should not have been allowed.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index