didier wrote:
But are canaries used at all? In my understanding without
DEBUG_INTENSE_CANARY_CHECKS they are never checked and it's unset by
default.
Erm, emem_free_all() checks that the canaries haven't been corrupted:
if (memcmp(npc->canary_info->canary[i], canary, npc->canary_info->cmp_len[i]) != 0)
g_error("Memory corrupted");
I fixed a bug a while ago where a dissector was writing past the end of
its se_alloc()'d memory:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1513
I don't think we can/should turn off canaries in se_ allocations.
Instead we should create a new canary-less allocator. (Not sure what
such a thing should be named, of course...)