Fix what seems like a clear buffer overflow, noticed by cppcheck.