lib/portableproplib/prop_object.c: CID 62703 (argument cannot be negative)
This commit is contained in:
parent
6a02cb6534
commit
9c5af90fae
@ -903,11 +903,17 @@ _prop_object_internalize_map_file(const char *fname)
|
||||
{
|
||||
struct stat sb;
|
||||
struct _prop_object_internalize_mapped_file *mf;
|
||||
size_t pgsize = (size_t)sysconf(_SC_PAGESIZE);
|
||||
size_t pgmask = pgsize - 1;
|
||||
long scps = sysconf(_SC_PAGESIZE);
|
||||
size_t pgsize, pgmask;
|
||||
bool need_guard = false;
|
||||
int fd;
|
||||
|
||||
if (scps == -1)
|
||||
return NULL;
|
||||
|
||||
pgsize = (size_t)scps;
|
||||
pgmask = pgsize -1;
|
||||
|
||||
mf = _PROP_MALLOC(sizeof(*mf), M_TEMP);
|
||||
if (mf == NULL)
|
||||
return (NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user