SimpleAmqpClient
SimpleAmqpClient copied to clipboard
`std::bad_alloc()` when header table is empty
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.
The
stamps is a table that has no entries.