Commit 6df5f35e authored by Daniel Gustafsson's avatar Daniel Gustafsson
Browse files

tool_cb_prg: Fix integer overflow in progress bar

Commit 61faa0b4

 fixed the progress bar
width calculation to avoid integer overflow, but failed to account for
the fact that initial_size is initialized to -1 when the file size is
retrieved from the remote on an upload, causing another signed integer
overflow.  Fix by separately checking for this case before the width
calculation.

Closes #3984
Reported-by: Brian Carpenter (Geeknik Labs)
Reviewed-by: default avatarDaniel Stenberg <daniel@haxx.se>
parent deb9462f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment