Merge pull request #462 from knnniggett/memory

Fix for shared data size conflict
This commit is contained in:
Isaac Connor 2014-10-17 09:18:21 -04:00
commit a043526994
1 changed files with 12 additions and 1 deletions

View File

@ -126,8 +126,19 @@ else
ZoneMinder::Memory::Shared->import();
}
# Detaint our environment
$ENV{PATH} = '/bin:/usr/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
# Native architecture
our $arch = int(3.2*length(~0));
# The following returned the wrong result on some 32 bit distros running on 64 bit hardware
#our $arch = int(3.2*length(~0));
# New method for determining the bitness
our $arch = 32 + 32*( qx(uname -m) =~ /64/ );
our $native = $arch/8;
our $mem_seq = 0;