Fix 64-bit build.
A warning about signed vs unsigned comparison was converted
into an error here :
...
struct stat st;
if (st.st_size > sizeof(prop_area) {
...
st_size is either an off64_t, which is a signed type. It's
worth investigating why this didn't trigger a warning on 32 bit,
where it's signed as well.
Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b
This commit is contained in:
@@ -238,7 +238,7 @@ static int map_fd_ro(const int fd) {
|
||||
if ((fd_stat.st_uid != 0)
|
||||
|| (fd_stat.st_gid != 0)
|
||||
|| ((fd_stat.st_mode & (S_IWGRP | S_IWOTH)) != 0)
|
||||
|| (fd_stat.st_size < sizeof(prop_area)) ) {
|
||||
|| (fd_stat.st_size < static_cast<off_t>(sizeof(prop_area))) ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user