[ticket/11552] Fix overflow for large attachments

Fix overflow for large attached images

PHPBB3-11552