projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Talk about write() to stdout more.
[pintos-anon]
/
src
/
userprog
/
process.c
diff --git
a/src/userprog/process.c
b/src/userprog/process.c
index b8d4a14462c63faecf6ac69944db4180b83d2914..90ff18b14ddaae54563ee7d53d6c0cef538fe5aa 100644
(file)
--- a/
src/userprog/process.c
+++ b/
src/userprog/process.c
@@
-320,7
+320,7
@@
load_segment (struct file *file, const struct Elf32_Phdr *phdr)
}
/* p_offset must point within file. */
- if (phdr->p_offset
< 0 || phdr->p_offset >
file_length (file))
+ if (phdr->p_offset
> (Elf32_Off)
file_length (file))
{
printf ("bad p_offset %"PE32Ox, phdr->p_offset);
return false;