File offset stored in 32-bit variable #1132

issue jgarzik opened this issue on April 22, 2012
  1. jgarzik commented at 5:29 AM on April 22, 2012: contributor

    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.

  2. sipa commented at 12:10 PM on April 22, 2012: member

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

  3. jgarzik commented at 10:08 PM on April 15, 2013: contributor

    Outdated

  4. jgarzik closed this on Apr 15, 2013

  5. lateminer referenced this in commit a34a7dfe1f on Dec 25, 2019
  6. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me