add more checks around picture allocation
add more checks around picture allocation

covers overflow corner cases for 32/64bit platforms.

Change-Id: I0c9169264c33a4e9d0bbfdb026fb0d82c7e56de8

ya7lelkom/libwebp,keane83/BLE_IM,zofuthan/libwebp,ya7lelkom/libwebp,matanbs/webm.libwebp,keane83/BLE_IM,Suvarna1488/webm.libwebp,Distrotech/libwebp,Suvarna1488/webm.libwebp,abwiz0086/webm.libwebp,webmproject/libwebp,Tekserve/libwebp,appunite/libwebp,appunite/libwebp,cysp/libwebp,Aexyn/libwebp,kim42083/webm.libwebp,imazen/libwebp,altogother/webm.libwebp,jacklicn/libwebp,imazen/libwebp,rxl194/libwebp,zofuthan/libwebp,ttyangf/libwebp,ya7lelkom/libwebp,redengineer/libwebp,redengineer/libwebp,jiehu5114/libwebp,Aexyn/libwebp,kleopatra999/webm.libwebp,kalli123/webm.libwebp,cysp/libwebp,Acidburn0zzz/webm.libwebp,Maria1099/webm.libwebp,yohunl/libwebp,rxl194/libwebp,redengineer/libwebp,rxl194/libwebp,comoyo/gonzo-libwebp,PKRoma/libwebp,yohunl/libwebp,reimaginemedia/webm.libwebp,zofuthan/libwebp,jiehu5114/libwebp,altogother/webm.libwebp,zofuthan/libwebp,webmproject/libwebp,webmproject/libwebp,Acidburn0zzz/webm.libwebp,Suvarna1488/webm.libwebp,webmproject/libwebp,jacklicn/libwebp,comoyo/gonzo-libwebp,iniwf/webm.libwebp,altogother/webm.libwebp,comoyo/gonzo-libwebp,kim42083/webm.libwebp,reimaginemedia/webm.libwebp,reimaginemedia/webm.libwebp,iniwf/webm.libwebp,Acidburn0zzz/webm.libwebp,PKRoma/libwebp,imazen/libwebp,kalli123/webm.libwebp,altogother/webm.libwebp,Maria1099/webm.libwebp,cysp/libwebp,abwiz0086/webm.libwebp,rxl194/libwebp,Acidburn0zzz/webm.libwebp,iniwf/webm.libwebp,kim42083/webm.libwebp,Aexyn/libwebp,appunite/libwebp,matanbs/webm.libwebp,reimaginemedia/webm.libwebp,ericmckean/webm.libwebp,abwiz0086/webm.libwebp,imazen/libwebp,ericmckean/webm.libwebp,Tekserve/libwebp,Distrotech/libwebp,kleopatra999/webm.libwebp,redengineer/libwebp,appunite/libwebp,webmproject/libwebp,abwiz0086/webm.libwebp,ya7lelkom/libwebp,ericmckean/webm.libwebp,Maria1099/webm.libwebp,abwiz0086/webm.libwebp,kleopatra999/webm.libwebp,jiehu5114/libwebp,Aexyn/libwebp,cysp/libwebp,yohunl/libwebp,gshORTON/webm.libwebp,PKRoma/libwebp,Maria1099/webm.libwebp,iniwf/webm.libwebp,Tekserve/libwebp,ttyangf/libwebp,iniwf/webm.libwebp,rxl194/libwebp,keane83/BLE_IM,jiehu5114/libwebp,appunite/libwebp,kim42083/webm.libwebp,dumganhar/libwebp,comoyo/gonzo-libwebp,Maria1099/webm.libwebp,Tekserve/libwebp,PKRoma/libwebp,comoyo/gonzo-libwebp,matanbs/webm.libwebp,keane83/BLE_IM,ericmckean/webm.libwebp,ya7lelkom/libwebp,jacklicn/libwebp,Aexyn/libwebp,zofuthan/libwebp,PKRoma/libwebp,comoyo/gonzo-libwebp,reimaginemedia/webm.libwebp,ericmckean/webm.libwebp,redengineer/libwebp,yohunl/libwebp,kim42083/webm.libwebp,appunite/libwebp,PKRoma/libwebp,yohunl/libwebp,Acidburn0zzz/webm.libwebp,dumganhar/libwebp,altogother/webm.libwebp,ttyangf/libwebp,imazen/libwebp,jacklicn/libwebp,kleopatra999/webm.libwebp,Suvarna1488/webm.libwebp,comoyo/gonzo-libwebp,gshORTON/webm.libwebp,gshORTON/webm.libwebp,jiehu5114/libwebp,gshORTON/webm.libwebp,gshORTON/webm.libwebp,dumganhar/libwebp,Suvarna1488/webm.libwebp,Distrotech/libwebp,kalli123/webm.libwebp,matanbs/webm.libwebp,kalli123/webm.libwebp,kleopatra999/webm.libwebp,jacklicn/libwebp,ttyangf/libwebp,ttyangf/libwebp,matanbs/webm.libwebp,kalli123/webm.libwebp,keane83/BLE_IM