Skip to content

Commit

Permalink
* compile.c (ibf_load_setup): check tainted string argument.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed Dec 18, 2015
1 parent f64238e commit dd5fd65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Fri Dec 18 16:50:35 2015 Koichi Sasada <[email protected]>

* compile.c (ibf_load_setup): check tainted string argument.

Fri Dec 18 16:12:13 2015 Koichi Sasada <[email protected]>

* vm_core.h: define USE_LAZY_LOAD if it is not defined.
Expand Down
2 changes: 2 additions & 0 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -8203,6 +8203,8 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
static void
ibf_load_setup(struct ibf_load *load, VALUE loader_obj, VALUE str)
{
rb_check_safe_obj(str);

if (RSTRING_LENINT(str) < (int)sizeof(struct ibf_header)) {
rb_raise(rb_eRuntimeError, "broken binary format");
}
Expand Down

0 comments on commit dd5fd65

Please sign in to comment.