projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Loader: Use address mask provided to load*Symbols when loading the symbols from the...
[gem5.git]
/
src
/
base
/
loader
/
hex_file.cc
diff --git
a/src/base/loader/hex_file.cc
b/src/base/loader/hex_file.cc
index 17347531eb1458360c69318b40d2c4ae1bb8f53b..61d6c80096da2515ae242140aa458ad123b6fc45 100755
(executable)
--- a/
src/base/loader/hex_file.cc
+++ b/
src/base/loader/hex_file.cc
@@
-65,7
+65,9
@@
HexFile::loadSections(Port *memPort)
Addr MemAddr;
uint32_t Data;
while (!feof(fp)) {
- fgets(Line, 64, fp);
+ char *ret = fgets(Line, sizeof(Line), fp);
+ if (!ret)
+ panic("malformed file");
parseLine(Line, &MemAddr, &Data);
if (MemAddr != 0) {
// Now, write to memory