lib/flash.c: Fix image size check in os_area_image_write

The os_area_image_write() routine was not checking the size
of the supplied image correctly.  If the image was too
large to fit os_area_image_write() would silently continue
and write part of the image to flash.  The only indicator
that an error occured was that the printed size of the
written image was smaller than the actual size of the image.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
1 file changed