[upstream] Fix DoS vulnerability in the GIF image handler affecting Qt-4.8.5.