[Yaffs] yaffs bug ?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Amir Comforti
Date:  
To: yaffs@lists.aleph1.co.uk
Subject: [Yaffs] yaffs bug ?
Hi Charles,

In function yaffs_lseek,

                        if(whence == SEEK_SET){
                                    if(offset >= 0)
                                                pos = offset;
                        } else if(whence == SEEK_CUR) {
                                    if( (fd->position + offset) >= 0)
                                                pos = (fd->position + offset);



if( (fd->position + offset) >= 0)     : since fd->position is u32 (unsigned int), the expression can never be negative.
Is this a bug?


-------------------------------------------------------------------------
Amir Comforti
Zoran Microelectronics Ltd
Phone:  +972 4 8546310
Email:   <mailto:amir.comforti@zoran.com>
Web:    www.zoran.com<http://www.zoran.com/>
-------------------------------------------------------------------------