提交 f66dafe7 编写于 作者: Y yungchi@cs.nctu.edu.tw

fix lseek underflow problem

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1767 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 3d9e766c
...@@ -200,6 +200,11 @@ off_t lseek(int fd, off_t offset, int whence) ...@@ -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)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册