Bug-fix: Clamp backward dist to 1.
Bug-fix: Clamp backward dist to 1.

Check for valid bounds on the 'dist' in backward reference case.
Clamp it to 1 in case of zero and negative values.

Change-Id: I78e956d4595955efa02b1f9628b475093f6ee001

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