Fix: misunderstanding of maxbytes and read return
Created by: mmege
Using swupdate with Delta handler makes the handler compute zck index for src file/dev. The buggy loop:
- did not consider the size of the src
- crash due to read() call reaching the end of file