Author: wmb Date: 2008-01-18 07:49:42 +0100 (Fri, 18 Jan 2008) New Revision: 779
Modified: cpu/x86/pc/olpc/mfgdata.fth Log: OLPC trac 6080 - Fixed bug in mfg data tag scanner that was causing the keyboard driver to crash with a stack underflow when looking for the KA tag in a mfg data area that had been corrupted with a malformed long-data tag. The bug was a "3drop" that should have been a "2drop".
Modified: cpu/x86/pc/olpc/mfgdata.fth =================================================================== --- cpu/x86/pc/olpc/mfgdata.fth 2008-01-17 09:19:13 UTC (rev 778) +++ cpu/x86/pc/olpc/mfgdata.fth 2008-01-18 06:49:42 UTC (rev 779) @@ -13,7 +13,7 @@ dup 4 - c@ dup h# 80 and if drop true exit then ( adr low ) over 5 - c@ dup h# 80 and if 2drop true exit then ( adr low high ) 2dup xor h# ff xor ( adr low high check ) - 3 pick 3 - c@ <> if 3drop true exit then ( adr low high ) + 3 pick 3 - c@ <> if 2drop true exit then ( adr low high ) 7 << + ( adr length ) - 5 - ( data-adr ) else \ Short (4-byte tag) format