DymOK93 / DymOK93/KTL

Add object count check to ktl::allocator

Open
#265 0 comments 0 reactions 1 assignee Claimed by @DymOK93 View on GitHub
bug
Dominant language
C++
Stars
99
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Overflow may occur as a result of multiplication: https://github.com/DymOK93/KTL/blob/master/include/allocator.hpp
Possible fix:
```c++
throw_exception_if(count > numeric_limits::max() / sizeof(Ty));
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.