Lind-Project / native_client

native_client trusted code base
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Clean FD conversion in syscall_common #98

Closed rennergade closed 2 years ago

rennergade commented 2 years ago

PR for https://github.com/Lind-Project/lind_project/issues/209

Adds checks to syscall_common functions that utilize file descriptors to make sure they're positive and below FILEDESC_MAX.

rennergade commented 2 years ago

Seems like pretty reasonable sanity checking. Is FILE_DESC_MAX really a tight bound? Or should it be >= FILE_DESC_MAX?

Good catch, just fixed that.