your strtol probably doesn't return 64 bit values. its return value is specified to be 'long int' which apparently in your case is 32 bits.

per the definition of strtol
"If the correct value is...