logoalt Hacker News

Joker_vD • yesterday at 10:06 PM • 1 reply • view on HN

Have you seen the wave of recent Whatever2Shell CVEs? Several of them happened precisely because "a type that could only represent positive integers" was used for the sizes.


Replies

grg0 • yesterday at 10:17 PM

I don't think that's what he's talking about. The problem with those CVEs is an unsigned type with default wrap semantics. But it need not be like that. Look at how Ada allows user-defined integers.