| ▲ | userbinator 3 hours ago |
| If you mean ceil(inlen * 4/3) + 1 (even if you use exact arithmetic), then you are passing too small a buffer and you will overflow. If you let untrusted input reach inlen and overflow that computation, you have already failed: https://news.ycombinator.com/item?id=50570319 |
|
| ▲ | amluto 37 minutes ago | parent [-] |
| Are you saying that any code that base64’s a string of attacker-controlled length is a mistake? |
| |
| ▲ | Pinus 22 minutes ago | parent [-] | | I think userbinator thought that you meant that the calculation would overflow, while I think you meant that the calculation, even if not overflowing, would return the wrong value under some conditions and that subsequent code would then overflow the buffer. (As for what I think about the actual issue, I’m too sleepy to even try. Which is probably an indication of something. =) ) |
|