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

Allocated buffer of size UINT_MAX #675

Closed
sth opened this issue Mar 12, 2018 · 1 comment
Closed

Allocated buffer of size UINT_MAX #675

sth opened this issue Mar 12, 2018 · 1 comment

Comments

@sth
Copy link

sth commented Mar 12, 2018

A 4GB buffer is allocated internally when formatting this:

fmt::format("{:= }", 1.0)

In format.h:2790, as.width_ is zero and wraps to UINT_MAX when being decremented.

I'm not sure if the calculation is also off by one in other cases.

@vitaut
Copy link
Contributor

vitaut commented Mar 12, 2018

Great catch, thanks! Fixed in 7db0e94.

@vitaut vitaut closed this as completed Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants