projects
/
platform
/
upstream
/
orc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a7c051
)
parse: Add some bounds checking
author
David Schleef
<ds@schleef.org>
Sun, 5 Sep 2010 19:57:56 +0000
(12:57 -0700)
committer
David Schleef
<ds@schleef.org>
Sun, 5 Sep 2010 19:57:56 +0000
(12:57 -0700)
orc/orcparse.c
patch
|
blob
|
history
diff --git
a/orc/orcparse.c
b/orc/orcparse.c
index 88bb712eade3c62e9f3f21245fd5f0d3446c55f8..98cb6db41ccc245446f224130caea0a61f6ebcf8 100644
(file)
--- a/
orc/orcparse.c
+++ b/
orc/orcparse.c
@@
-259,7
+259,9
@@
orc_parse_full (const char *code, OrcProgram ***programs, char **log)
} else {
free (parser->log);
}
- parser->programs[0]->init_function = init_function;
+ if (parser->programs[0]) {
+ parser->programs[0]->init_function = init_function;
+ }
*programs = parser->programs;
return parser->n_programs;
}