HexBrain

curl · Report #774883

Division by zero if terminal width is 2

Informativestatus
1upvotes
8 Feb 2021disclosed

How it was found

Summary:

In fly() there will be a division by zero if progress bar width is 2.

That can happen if terminal width is 2.

Steps To Reproduce:

This script crash: stty rows 10 cols 2 ; curl --progress-bar somefile > temp

Impact

I believe that if it's possible to set terminal width for a service, then that service will not be able to curl.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original