-
Andreas Cadhalpun authored
It can read less than the requested amount, in which case buf contains uninitialized data, causing problems like segmentation faults later on. Also make sure that image->size is positive, so that it can't match a negative error code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit 89eb398c ) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
c35a140e