projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fdbb42
)
Add check for BLIF with no model name
author
Archie
<ac11018@ic.ac.uk>
Tue, 14 Jun 2022 13:17:00 +0000
(14:17 +0100)
committer
Lofty
<dan.ravensloft@gmail.com>
Tue, 21 Jun 2022 23:34:49 +0000
(
00:34
+0100)
frontends/blif/blifparse.cc
patch
|
blob
|
history
diff --git
a/frontends/blif/blifparse.cc
b/frontends/blif/blifparse.cc
index 19844bda6e2e8920ba87aceeb88bd514e6504d6b..73d1f0ea798f206fed9aeaa95e3a6fd25e3e31b1 100644
(file)
--- a/
frontends/blif/blifparse.cc
+++ b/
frontends/blif/blifparse.cc
@@
-166,7
+166,10
@@
void parse_blif(RTLIL::Design *design, std::istream &f, IdString dff_name, bool
goto error;
module = new RTLIL::Module;
lastcell = nullptr;
- module->name = RTLIL::escape_id(strtok(NULL, " \t\r\n"));
+ char *name = strtok(NULL, " \t\r\n");
+ if (name == nullptr)
+ goto error;
+ module->name = RTLIL::escape_id(name);
obj_attributes = &module->attributes;
obj_parameters = nullptr;
if (design->module(module->name))