Skip to content

Trashage of the heap #1516

@davepl

Description

@davepl

In Irrecv.cpp, you poke values into rawbuf[rawlen] in many cases. However, you only allocate 100 bytes. When rawlen gets to be 100, you still do it. So you actually need to allocate one more byte than you do (or stop writing past the end of the buffer, but its easier to allocate an extra byte).

I've confirmed this change locally stops it from overwriting the heap tag.

Thanks!

To fix this, in IRRecv::IRecv, change

params.rawbuf = new uint16_t[bufsize];

to

params.rawbuf = new uint16_t[bufsize+1];

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions