Check read() and write() for offset + count wraparound
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 2 Mar 2019 00:50:43 +0000 (19:50 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sat, 2 Mar 2019 00:50:43 +0000 (19:50 -0500)
commit598870e5d3566dce00516a5b585bbda4da203904
tree4fa9132e064537f3e2df405107857e53d486a9b3
parent27178190dd7ca99d3b64ee6d46e33bea5f80e4cb
Check read() and write() for offset + count wraparound

If you gave a file a very large count and the sum offset + count wrapped
around, you could confuse the system into thinking you had a smaller
file.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/fs_file.c
kern/src/ns/sysfile.c