Attached is a simple patch that fixes this by extending the buffer by 2 bytes. (considering that the code always ends up putting an 11-char string (plus the '\0' making 12 bytes total) into a 10-byte buffer, I figured just making it a 12-byte buffer would be the correct fix).
Created attachment 248942 [details, diff] increase buffer size
Committed.