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:
yungchi@cs.nctu.edu.tw 2011-10-17 11:33:30 +00:00
parent 3d9e766c86
commit f66dafe7a6
1 changed files with 673 additions and 668 deletions

View File

@ -200,6 +200,11 @@ off_t lseek(int fd, off_t offset, int whence)
break;
}
if( offset < 0 )
{
rt_set_errno(EINVAL);
return -1;
}
result = dfs_file_lseek(d, offset);
if (result < 0)
{