bufferlist: avoid reading past the array
bufferlist: avoid reading past the array

When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.

cfoch/gstreamer,mparis/gstreamer,centricular/gstreamer,surround-io/gstreamer,krichter722/gstreamer,ensonic/gstreamer,cablelabs/gstreamer,justinjoy/gstreamer,jpxiong/gstreamer,surround-io/gstreamer,cablelabs/gstreamer,cfoch/gstreamer,justinjoy/gstreamer,StreamUtils/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,shelsonjava/gstreamer,lubosz/gstreamer,krieger-od/gstreamer,krichter722/gstreamer,lovebug356/gstreamer,centricular/gstreamer,Lachann/gstreamer,surround-io/gstreamer,cablelabs/gstreamer,krichter722/gstreamer,jpakkane/gstreamer,cfoch/gstreamer,collects/gstreamer,shelsonjava/gstreamer,krichter722/gstreamer,lovebug356/gstreamer,collects/gstreamer,cablelabs/gstreamer,justinjoy/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,lubosz/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,Lachann/gstreamer,Lachann/gstreamer,jpxiong/gstreamer,surround-io/gstreamer,StreamUtils/gstreamer,Lachann/gstreamer,collects/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,lovebug356/gstreamer,jpakkane/gstreamer,jpakkane/gstreamer,lovebug356/gstreamer,lovebug356/gstreamer,mparis/gstreamer,centricular/gstreamer,krichter722/gstreamer,mparis/gstreamer,StreamUtils/gstreamer,shelsonjava/gstreamer,justinjoy/gstreamer,jpakkane/gstreamer,justinjoy/gstreamer,cfoch/gstreamer,jpxiong/gstreamer,krieger-od/gstreamer,ensonic/gstreamer,mparis/gstreamer,krieger-od/gstreamer,surround-io/gstreamer,Lachann/gstreamer,jpxiong/gstreamer,StreamUtils/gstreamer,cablelabs/gstreamer,lubosz/gstreamer,collects/gstreamer,centricular/gstreamer,centricular/gstreamer,jpakkane/gstreamer,jpxiong/gstreamer,collects/gstreamer,StreamUtils/gstreamer,ensonic/gstreamer,mparis/gstreamer,cfoch/gstreamer