Skip to content

crash on Buffer error in v6 #6510

@Hamper

Description

@Hamper
  • Version: v6.0.0
  • Platform: Linux notebook 4.5.2-calculate test: don't remove empty.txt on win32 #2 SMP PREEMPT Sat Apr 23 00:07:11 MSK 2016 x86_64 AMD A10-5750M APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux
  • Subsystem:
b = new Buffer([1,2])
b.lastIndexOf('123')

Result:

node: ../src/string_search.h:655: size_t node::SearchString(const Char*, size_t, const Char*, size_t, size_t, bool) [with Char = unsigned char; size_t = long unsigned int]: Assertion `haystack_length >= needle_length' failed.
[1]    6843 abort (core dumped)  node

In v5 last string just return -1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions