Skip to content

Heap buffer overflow introduced in #3553 #3572

Closed
@Asmod4n

Description

@Asmod4n

https://github.com/mruby/mruby/pull/3553/files#diff-d13030dbdc98ec484fa8f0e9cbc31443R218 is accessing one element too much of the array, tests still pass when <= is changed to < in for (j = i; j <= a->len - len; ++j) { block but dunno if it still works as expected.

These kind of bugs can be found quite good with

  conf.cc.flags << '-fsanitize=address'
  conf.linker.flags << '-fsanitize=address'

added to build_config.rb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions