Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
ff958283
Commit
ff958283
authored
Aug 19, 2014
by
Tatsuhiko Kubo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error hanldlings in read_irep_record().
read_irep_record_1() and read_irep_record() may return NULL.
parent
f62dc56b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/load.c
src/load.c
+7
-0
No files found.
src/load.c
View file @
ff958283
...
...
@@ -164,11 +164,18 @@ read_irep_record(mrb_state *mrb, const uint8_t *bin, size_t *len, mrb_bool alloc
mrb_irep
*
irep
=
read_irep_record_1
(
mrb
,
bin
,
len
,
alloc
);
size_t
i
;
if
(
irep
==
NULL
)
{
return
NULL
;
}
bin
+=
*
len
;
for
(
i
=
0
;
i
<
irep
->
rlen
;
i
++
)
{
size_t
rlen
;
irep
->
reps
[
i
]
=
read_irep_record
(
mrb
,
bin
,
&
rlen
,
alloc
);
if
(
irep
->
reps
[
i
]
==
NULL
)
{
return
NULL
;
}
bin
+=
rlen
;
*
len
+=
rlen
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment