fix lseek underflow problem
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1767 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
3d9e766c86
commit
f66dafe7a6
@ -200,6 +200,11 @@ off_t lseek(int fd, off_t offset, int whence)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( offset < 0 )
|
||||||
|
{
|
||||||
|
rt_set_errno(EINVAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
result = dfs_file_lseek(d, offset);
|
result = dfs_file_lseek(d, offset);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user