Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for very long input lines (> 2Gbyte) #1542

Merged
merged 3 commits into from Jan 16, 2023

Commits on Jan 4, 2023

  1. Cap bgzf_getline return value to INT_MAX

    Prevents overflow on long lines, which could result in a negative
    number being returned even if the read was otherwise successful.
    daviesrob committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    dcced53 View commit details
    Browse the repository at this point in the history
  2. Make tbx_parse1 work for lines longer than 2Gbytes

    Change the type of len, i and b so they can index positions
    over 2Gbytes into the input string.  Naturally this is only useful
    on 64 bit platforms as the entire input needs to be in memory.
    
    Luckily this function isn't exported, so changing the type of
    len does not affect the ABI.
    daviesrob committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    59bbba4 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. Use correct type for ret in vcf_write()

    It needs to be ssize_t to prevent possible overflow when writing
    very long records on 64 bit platforms.
    daviesrob committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    f0ddc57 View commit details
    Browse the repository at this point in the history