VFS: fix coverity defects
This commit is contained in:
parent
fd60f03129
commit
0d3ccd8908
2 changed files with 2 additions and 2 deletions
|
@ -738,7 +738,7 @@ static void get_work()
|
||||||
}
|
}
|
||||||
|
|
||||||
proc_p = _ENDPOINT_P(m_in.m_source);
|
proc_p = _ENDPOINT_P(m_in.m_source);
|
||||||
if (proc_p < 0) fp = NULL;
|
if (proc_p < 0 || proc_p >= NR_PROCS) fp = NULL;
|
||||||
else fp = &fproc[proc_p];
|
else fp = &fproc[proc_p];
|
||||||
|
|
||||||
if (m_in.m_type == EDEADSRCDST) return; /* Failed 'sendrec' */
|
if (m_in.m_type == EDEADSRCDST) return; /* Failed 'sendrec' */
|
||||||
|
|
|
@ -575,7 +575,7 @@ char ename[NAME_MAX + 1];
|
||||||
cur = (struct dirent *) (buf + consumed);
|
cur = (struct dirent *) (buf + consumed);
|
||||||
name_len = cur->d_reclen - offsetof(struct dirent, d_name) - 1;
|
name_len = cur->d_reclen - offsetof(struct dirent, d_name) - 1;
|
||||||
|
|
||||||
if(cur->d_name + name_len >= &buf[DIR_ENTRIES * DIR_ENTRY_SIZE])
|
if(cur->d_name + name_len+1 >= &buf[DIR_ENTRIES*DIR_ENTRY_SIZE])
|
||||||
return(EINVAL); /* Rubbish in dir entry */
|
return(EINVAL); /* Rubbish in dir entry */
|
||||||
if (entry->v_inode_nr == cur->d_ino) {
|
if (entry->v_inode_nr == cur->d_ino) {
|
||||||
/* found the entry we were looking for */
|
/* found the entry we were looking for */
|
||||||
|
|
Loading…
Reference in a new issue