Author: wmb Date: 2007-05-31 00:41:42 +0200 (Thu, 31 May 2007) New Revision: 429
Modified: ofw/fs/jffs2/jffs2.fth Log: JFFS2 - OLPC Trac #1609 - Handle truncated files without crashing (don't erase a negative length).
Modified: ofw/fs/jffs2/jffs2.fth =================================================================== --- ofw/fs/jffs2/jffs2.fth 2007-05-30 07:32:30 UTC (rev 428) +++ ofw/fs/jffs2/jffs2.fth 2007-05-30 22:41:42 UTC (rev 429) @@ -820,7 +820,7 @@ 2 pick ( final write hiwater final ) over - ( final write hiwater extra ) swap file-buf + swap ( final write buf-adr extra ) - erase ( final write ) + 0 max erase ( final write ) \ 0 max accounts for truncation then ( final write ) drop to file-size \ Set overall length ;