SimpleAmqpClient icon indicating copy to clipboard operation
SimpleAmqpClient copied to clipboard

`std::bad_alloc()` when header table is empty

Open olii opened this issue 2 years ago • 0 comments

There is a bug when the AMQP header table has a nested table that is empty (0 entries). The exception std::bad_alloc() is thrown.

This is the line: https://github.com/alanxz/SimpleAmqpClient/blob/6369b99711ce0ada3e55a1a66cb45dbc005b5e8c/src/TableImpl.cpp#L353-L354 Then this is called and it throws the exception: https://github.com/alanxz/SimpleAmqpClient/blob/6369b99711ce0ada3e55a1a66cb45dbc005b5e8c/src/TableImpl.cpp#L306-L314

I experience this by trying to consume the celery v5.3.1 event. image The stamps is a table that has no entries.

olii avatar Aug 03 '23 15:08 olii