Skip to content

More overflow and malloc checks

Choose a tag to compare

@autarch autarch released this 05 Jan 21:40

This tarball has since been removed because it was not cleanly packaged. Use 1.1.4 or newer instead.

  • Added several additional checks to make sure that we don't attempt to read
    past the end of the databases's data section. Implemented by Tobias
    Stoeckmann. GitHub #103.
  • When searching for the database metadata, there was a bug that caused the
    code to think it had found valid metadata when none existed. In addition,
    this could lead to an attempt to read past the end of the database
    entirely. Finally, if there are multiple metadata markers in the database,
    we treat the final one as the start of the metdata, instead of the first.
    Implemented by Tobias Stoeckmann. GitHub #102.
  • Don't attempt to mmap a file that is too large to be mmapped on the
    system. Implemented by Tobias Stoeckmann. GitHub #101.
  • Added a missing out of memory check when reading a file's
    metadata. Implemented by Tobias Stoeckmann. GitHub #101.
  • Added several additional checks to make sure that we never attempt to
    malloc more than SIZE_MAX memory, which would lead to integer
    overflow. This could only happen with pathological databases. Implemented by
    Tobias Stoeckmann. GitHub #101.