projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bada3ee
)
Fixed memory corruption in passes/abc/blifparse.cc
author
Clifford Wolf
<clifford@clifford.at>
Tue, 11 Mar 2014 12:09:01 +0000
(13:09 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Tue, 11 Mar 2014 12:09:01 +0000
(13:09 +0100)
passes/abc/blifparse.cc
patch
|
blob
|
history
diff --git
a/passes/abc/blifparse.cc
b/passes/abc/blifparse.cc
index 2d46d1a8ef6525f22fa8ddfa4081353b12fe03c4..1d4da19ad1b383ca59455c6331a55566222d25a2 100644
(file)
--- a/
passes/abc/blifparse.cc
+++ b/
passes/abc/blifparse.cc
@@
-40,7
+40,7
@@
static bool read_next_line(char *&buffer, size_t &buffer_size, int &line_count,
}
if (buffer_len == 0 || buffer[buffer_len-1] == '\\') {
- if (buffer[buffer_len-1] == '\\')
+ if (buffer
_len > 0 && buffer
[buffer_len-1] == '\\')
buffer[--buffer_len] = 0;
line_count++;
if (fgets(buffer+buffer_len, buffer_size-buffer_len, f) == NULL)