Re: Linux 2.4.20-rc2 screwy ac97_codec.c:codec_id()

From: Paul (set@pobox.com)
Date: Thu Nov 21 2002 - 23:05:45 EST


Alan Cox <alan@lxorguk.ukuu.org.uk>, on Fri Nov 22, 2002 [01:57:06 AM] said:
> On Fri, 2002-11-22 at 01:14, Paul wrote:
> > Im pretty sure this is broken, but I dont know exactly
> > what it is trying to do.
> > The first snprintf is overwritten regardless-- missing
> > else block? And its format string should probably be "%4X:%4X",
> > because whats there wont fit in the buffer.
>
> There is an else missing you are correct
>
        Hi;
        
        Well, just for the heck of it, here is a patch that
puts the else block in, and fixes the format so that it matches
previous output and fits in the buffer. If the powers that be
wanted "1234:ABCD" instead of "0x1234:0xabcd", then the
format string would be "%04X:%04X" and CODEC_ID_BUFSZ could
go back to 10.
        Tested.

Paul
set@pobox.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:39 EST