Turns out 64 is not enough for some device ids we can generate. On top of that, my commit fef9c1ba4e0c9944e9b6443c429581cae4fd6565 which introduced that code wrongly passes the buffer size (the size in bytes instead of character count) so longer ids corrupt stack instead of being skipped :(