image/png: reject zero-width and zero-height images.
image/png: reject zero-width and zero-height images.

http://www.w3.org/TR/PNG/#11IHDR says that "Zero is an invalid value".

This change only affects the decoder. The encoder already checks
non-positive instead of negative.

Fixes #12545.

Change-Id: Iba40e1a2f4e0eec8b2fbcd3bbdae886311434da7
Reviewed-on: https://go-review.googlesource.com/14411
Reviewed-by: Rob Pike <4dc7c9ec434ed06502767136789763ec11d2c4b7@golang.org>

ganboing/go-esx,jefby/go,momchil-velikov/go,Cofyc/go,golang/go,polyverse-security/go,vsekhar/elastic-go,beealone/go,derekmarcotte/go,vsekhar/elastic-go,xujianhai/go,b54898533/go,mikekap/go,CAFxX/go,ganboing/go-esx,arschles/golang-go,jacobhaven/go,jdhenke/go,ichu501/go,theif519/go,myPublicGit/go,fjballest/golang,danielsoro/go,yangzhongj/go,golang/go,likesea/go,xiuzhifu/go,cloudflare/go,ImJasonH/go,arschles/go-1,likesea/go,mikekap/go,kim-racktop/go,jacobhaven/go,jefby/go,odeke-em/go,jacobhaven/go,devpadawan/go,odeke-em/go,Samurais/go,theass/go,mikekap/go,Samurais/go,ericsnowcurrently/go,samanalysis/go,samanalysis/go,odeke-em/go,mikekap/go,beealone/go,myPublicGit/go,mdp/go,theass/go,myPublicGit/go,chinanjjohn2012/go,ichu501/go,ifagnosticism/go,fjballest/golang,miolini/go,ericsnowcurrently/go,devpadawan/go,skatsuta/go,dpatel06/go,alex-zhang/go,xiuzhifu/go,GeorgiCodes/go,danielsoro/go,roth1002/go,skatsuta/go,snowsnail/go,nawawi/go,CarterTsai/go,sndnvaps/go,arschles/go-1,Cofyc/go,Jordanzuo/go,vanloswang/go,cloudflare/go,xiuzhifu/go,ericsnowcurrently/go,cyberroadie/go,zhangg/go,ichu501/go,theif519/go,akutz/go,b54898533/go,roth1002/go,cyberroadie/go,joshsammut/go,mwhudson/go,momchil-velikov/go,akutz/go,Badredapple/go,skatsuta/go,ichu501/go,joshsammut/go,malvira/go,polyverse-security/go,derekmarcotte/go,alex-zhang/go,ganboing/go-esx,CAFxX/go,mdp/go,kim-racktop/go,NunoEdgarGub1/go,ichu501/go,josharian/go,golang/go,likesea/go,joshsammut/go,suncycheng/go,stormltf/go,Jordanzuo/go,jacobsa/go,zhangg/go,alex-zhang/go,deft-code/go,b54898533/go,binarycrusader/go,4ad/go,danielsoro/go,christopher-henderson/Go,xiuzhifu/go,theass/go,jacobsa/go,CarterTsai/go,odeke-em/go,Badredapple/go,alex-zhang/go,Pulgafree/go,jonasi/go,nawawi/go,arschles/golang-go,Badredapple/go,myPublicGit/go,miolini/go,Cofyc/go,codestation/go,mwhudson/go,mikekap/go,akutz/go,alex-zhang/go,yasarkunduz/go,cookerzhu/go,CAFxX/go,yangzhongj/go,ifagnosticism/go,akutz/go,xiuzhifu/go,ImJasonH/go,dpatel06/go,theif519/go,Pulgafree/go,josharian/go,derekmarcotte/go,likesea/go,skatsuta/go,josharian/go,danielsoro/go,mwhudson/go,odeke-em/go,binarycrusader/go,suncycheng/go,jacobhaven/go,malvira/go,GeorgiCodes/go,josharian/go,kim-racktop/go,polyverse-security/go,dterei/go,akutz/go,derekmarcotte/go,vsdutka/go,malvira/go,deft-code/go,jefby/go,theass/go,dterei/go,arschles/golang-go,nawawi/go,beealone/go,ImJasonH/go,suncycheng/go,myPublicGit/go,josharian/go,mikekap/go,myPublicGit/go,cookerzhu/go,GeorgiCodes/go,odeke-em/go,jdhenke/go,devpadawan/go,mdp/go,dterei/go,gdey/go,jonasi/go,Jordanzuo/go,cyberroadie/go,vanloswang/go,joshsammut/go,goodlang/good,NunoEdgarGub1/go,xujianhai/go,goodlang/good,polyverse-security/go,Pulgafree/go,4ad/go,cloudflare/go,stormltf/go,mwhudson/go,Endika/go,yasarkunduz/go,alex-zhang/go,Samurais/go,Pulgafree/go,jdhenke/go,cookerzhu/go,cloudflare/go,NunoEdgarGub1/go,devpadawan/go,Samurais/go,josharian/go,dpatel06/go,codestation/go,goodlang/good,Badredapple/go,snowsnail/go,roth1002/go,gdey/go,yangzhongj/go,CAFxX/go,ImJasonH/go,cloudflare/go,miolini/go,goodlang/good,xujianhai/go,zhangg/go,mwhudson/go,binarycrusader/go,xiuzhifu/go,Pulgafree/go,jacobsa/go,momchil-velikov/go,fjballest/golang,Badredapple/go,ifagnosticism/go,theif519/go,ImJasonH/go,deft-code/go,cookerzhu/go,b54898533/go,ifagnosticism/go,chinanjjohn2012/go,stormltf/go,chinanjjohn2012/go,suncycheng/go,jefby/go,malvira/go,fjballest/golang,momchil-velikov/go,danielsoro/go,fjballest/golang,Endika/go,jonasi/go,codestation/go,famorted/go,Badredapple/go,vsekhar/elastic-go,arschles/golang-go,miolini/go,ImJasonH/go,NunoEdgarGub1/go,nawawi/go,mdp/go,arschles/go-1,dterei/go,nawawi/go,golang/go,samanalysis/go,deft-code/go,jacobhaven/go,cookerzhu/go,roth1002/go,roth1002/go,b54898533/go,arschles/golang-go,Jordanzuo/go,vsekhar/elastic-go,gdey/go,Samurais/go,ganboing/go-esx,Samurais/go,dterei/go,vanloswang/go,CAFxX/go,mikekap/go,famorted/go,Jordanzuo/go,mdp/go,Cofyc/go,josharian/go,jefby/go,ericsnowcurrently/go,dterei/go,arschles/golang-go,codestation/go,CarterTsai/go,akutz/go,sndnvaps/go,devpadawan/go,ImJasonH/go,CarterTsai/go,momchil-velikov/go,sndnvaps/go,vsdutka/go,golang/go,vsdutka/go,stormltf/go,miolini/go,4ad/go,theass/go,snowsnail/go,Endika/go,arschles/go-1,chinanjjohn2012/go,rachtsingh/gogojuice,mwhudson/go,zhangg/go,jdhenke/go,polyverse-security/go,codestation/go,stormltf/go,snowsnail/go,binarycrusader/go,Badredapple/go,Samurais/go,yasarkunduz/go,arschles/golang-go,linux-on-ibm-z/go,rachtsingh/gogojuice,suncycheng/go,nawawi/go,yangzhongj/go,linux-on-ibm-z/go,vsdutka/go,Cofyc/go,yasarkunduz/go,theif519/go,codestation/go,momchil-velikov/go,chinanjjohn2012/go,vanloswang/go,fjballest/golang,cookerzhu/go,binarycrusader/go,Jordanzuo/go,arschles/go-1,CAFxX/go,ifagnosticism/go,ganboing/go-esx,roth1002/go,danielsoro/go,sndnvaps/go,ifagnosticism/go,gdey/go,vsekhar/elastic-go,xujianhai/go,GeorgiCodes/go,xujianhai/go,Pulgafree/go,malvira/go,cyberroadie/go,likesea/go,Cofyc/go,Endika/go,CarterTsai/go,devpadawan/go,jdhenke/go,famorted/go,zhangg/go,fjballest/golang,Endika/go,NunoEdgarGub1/go,mdp/go,codestation/go,dterei/go,likesea/go,linux-on-ibm-z/go,dpatel06/go,goodlang/good,cyberroadie/go,theif519/go,theass/go,binarycrusader/go,CarterTsai/go,goodlang/good,GeorgiCodes/go,4ad/go,kim-racktop/go,jonasi/go,CarterTsai/go,yangzhongj/go,polyverse-security/go,golang/go,theass/go,ganboing/go-esx,vsdutka/go,skatsuta/go,yasarkunduz/go,goodlang/good,miolini/go,jefby/go,likesea/go,cyberroadie/go,theif519/go,miolini/go,b54898533/go,jacobsa/go,kim-racktop/go,nawawi/go,cookerzhu/go,snowsnail/go,momchil-velikov/go,arschles/go-1,yangzhongj/go,NunoEdgarGub1/go,gdey/go,beealone/go,rachtsingh/gogojuice,NunoEdgarGub1/go,mwhudson/go,Endika/go,odeke-em/go,derekmarcotte/go,malvira/go,suncycheng/go,zhangg/go,beealone/go,famorted/go,cloudflare/go,linux-on-ibm-z/go,akutz/go,gdey/go,danielsoro/go,Pulgafree/go,deft-code/go,xiuzhifu/go,ichu501/go,beealone/go,cloudflare/go,linux-on-ibm-z/go,roth1002/go,dpatel06/go,derekmarcotte/go,kim-racktop/go,myPublicGit/go,devpadawan/go,deft-code/go,mdp/go,suncycheng/go,stormltf/go,dpatel06/go,4ad/go,theif519/go,samanalysis/go,vsdutka/go,sndnvaps/go,kim-racktop/go,joshsammut/go,snowsnail/go,golang/go,binarycrusader/go,famorted/go,Endika/go,alex-zhang/go,deft-code/go,snowsnail/go,vsekhar/elastic-go,jacobhaven/go,dpatel06/go,ganboing/go-esx,vsdutka/go,rachtsingh/gogojuice,cloudflare/go,joshsammut/go,xujianhai/go,rachtsingh/gogojuice,malvira/go,vanloswang/go,Badredapple/go,arschles/golang-go,xiuzhifu/go,fjballest/golang,cookerzhu/go,sndnvaps/go,josharian/go,Pulgafree/go,jonasi/go,samanalysis/go,vsdutka/go,Samurais/go,beealone/go,vsekhar/elastic-go,joshsammut/go,yasarkunduz/go,b54898533/go,4ad/go,jacobhaven/go,xujianhai/go,danielsoro/go,polyverse-security/go,codestation/go,myPublicGit/go,ericsnowcurrently/go,ichu501/go,jonasi/go,yangzhongj/go,akutz/go,mwhudson/go,cyberroadie/go,kim-racktop/go,CAFxX/go,jonasi/go,GeorgiCodes/go,arschles/go-1,linux-on-ibm-z/go,yasarkunduz/go,rachtsingh/gogojuice,golang/go,rachtsingh/gogojuice,ganboing/go-esx,odeke-em/go,Cofyc/go,goodlang/good,jacobsa/go,vanloswang/go,Cofyc/go,yasarkunduz/go,polyverse-security/go,famorted/go,suncycheng/go,jacobsa/go,skatsuta/go,devpadawan/go,cyberroadie/go,vanloswang/go,jacobhaven/go,joshsammut/go,NunoEdgarGub1/go,4ad/go,jdhenke/go,deft-code/go,mikekap/go,famorted/go,famorted/go,miolini/go,ifagnosticism/go,GeorgiCodes/go,ichu501/go,linux-on-ibm-z/go,CarterTsai/go,vsekhar/elastic-go,arschles/go-1,jacobsa/go,ericsnowcurrently/go,Jordanzuo/go,sndnvaps/go,malvira/go,jefby/go,skatsuta/go,ifagnosticism/go,4ad/go,Endika/go,Jordanzuo/go,zhangg/go,CAFxX/go,stormltf/go,GeorgiCodes/go,ericsnowcurrently/go,samanalysis/go,jefby/go,momchil-velikov/go,chinanjjohn2012/go,jdhenke/go,stormltf/go,samanalysis/go,xujianhai/go,roth1002/go,samanalysis/go,derekmarcotte/go,yangzhongj/go,dterei/go,sndnvaps/go,derekmarcotte/go,rachtsingh/gogojuice,theass/go,chinanjjohn2012/go,skatsuta/go,gdey/go,b54898533/go,alex-zhang/go,binarycrusader/go,ImJasonH/go,beealone/go,snowsnail/go,mdp/go,zhangg/go,jacobsa/go,linux-on-ibm-z/go,likesea/go,dpatel06/go,ericsnowcurrently/go,chinanjjohn2012/go,nawawi/go,gdey/go,vanloswang/go,jdhenke/go,jonasi/go