fix boundscheck
was checking upper bounds, but not lower bounds. This change fixes that.
This commit is contained in:
parent
439ac04a65
commit
37230bf0c3
|
|
@ -412,7 +412,7 @@ int do_vsafecopy(struct proc * caller, message * m_ptr)
|
|||
|
||||
/* No. of vector elements. */
|
||||
els = m_ptr->m_lsys_kern_vsafecopy.vec_size;
|
||||
if (els > SCPVEC_NR) {
|
||||
if (els < 0 || els > SCPVEC_NR) {
|
||||
return EINVAL;
|
||||
}
|
||||
bytes = els * sizeof(struct vscp_vec);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user