applypatch: Add a Makefile to build imgdiff in Chrome OS.

Also fixed some warnings and added check for target_len.

Test: mma; emerge-peppy imgdiff; emerge-nyan imgdiff; sudo emerge imgdiff
Bug: 26866274

Change-Id: Ifbcd3afd6701c769ccf626e33ed94461706f7ee6
This commit is contained in:
Sen Jiang
2016-02-02 16:01:23 +08:00
parent c213a7c1d1
commit 696692a3c9
6 changed files with 39 additions and 4 deletions

View File

@@ -224,7 +224,6 @@ static void offtout(off_t x,u_char *buf)
int bsdiff(u_char* old, off_t oldsize, off_t** IP, u_char* newdata, off_t newsize,
const char* patch_filename)
{
int fd;
off_t *I;
off_t scan,pos,len;
off_t lastscan,lastpos,lastoffset;