Merge "Fixing potential buffer overrun errors."