Server crashing sometimes from large values in twkb encoding
|Reported by:||nicklas||Owned by:||nicklas|
The attached geometry writes beyond the buffer.
In some cases it crashes the server.
It is caused from a large value that encodes to a variable integer of 10 bytes instead of the expected max 8 bytes. Most of the time this doesn't do any harm. But if the preceding point leaves exactly 8 bytes left in the buffer, the space check will not reallocate and writing 9 or 10 bytes will cause writing beyond the buffer.