fix overflowed return value

This commit is contained in:
David du Colombier 2017-08-01 21:16:00 +02:00
parent 8682038933
commit 341f974f7a
1 changed files with 3 additions and 3 deletions

6
elf.c
View File

@ -176,7 +176,7 @@ readelf32ehdr(FILE *f, Fhdr *fp)
fp->shnum = e.shnum;
fp->shstrndx = e.shstrndx;
return p - buf;
return (int)(p - buf);
}
/*
@ -247,7 +247,7 @@ readelf64ehdr(FILE *f, Fhdr *fp)
fp->shnum = e.shnum;
fp->shstrndx = e.shstrndx;
return p - buf;
return (int)(p - buf);
}
/*
@ -518,7 +518,7 @@ readident(FILE *f, Fhdr *fp)
fp->osabi = buf[EI_OSABI];
fp->abiversion = buf[EI_ABIVERSION];
return p - buf;
return (int)(p - buf);
}
/*