mozilla: Don't read beyond the buffer boundry

This fixes a buffer-overflow.
3 jobs for fix-buffer-overflow in 5 minutes and 46 seconds (queued for 2 minutes and 13 seconds)
Status Job ID Name Coverage
  Test
passed #670251
ubuntu-16.04

00:03:05

passed #670252
ubuntu-18.04

00:02:59

passed #670253
ubuntu-18.04-no-backend

00:02:40