mirror of
https://github.com/0intro/libelf
synced 2025-03-12 17:42:59 +03:00
fix overflowed return value
This commit is contained in:
parent
8682038933
commit
341f974f7a
6
elf.c
6
elf.c
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user