File offset stored in 32-bit variable #1132

jgarzik opened this Issue Apr 22, 2012 · 2 comments

2 participants

Bitcoin member

grep for 'ftell' and look at the usage of its return value, such as in e.g. nBlockPosRet.

File offsets should be stored in [u]int64, not unsigned int.

The specific example is not strictly a bug, because we cap the size of our block chain data files before the 4GB barrier. However, re-use of this code for other files could lead to bugs and problems.

Bitcoin member

I agree, but I'm not sure it's worth the trouble to fix it.

Bitcoin member


@jgarzik jgarzik closed this Apr 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment