Skip to content

Integer overflow when using the C progress bar API #335

Description

@jimhester

When using the C progress bar API it is possible to overflow the 32 bit int data type if you pass a value larger than can be stored in an int, e.g. more than 2147483647.

In my case I was trying to use the download progress bar type and simply passing the number of bytes read so far to cli_progress_set() with a ~ 3 Gb file.

Would it be possible for the functions accept a wider integer type like int64_t or size_t to avoid this issue for most real world integers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions