←back to thread

171 points irke882 | 1 comments | | HN request time: 0.206s | source
Show context
quotemstr ◴[] No.44507375[source]
But I thought security vulnerabilities couldn't happen in memory-safe languages!
replies(3): >>44507845 #>>44508369 #>>44513650 #
1. grumpyprole ◴[] No.44513650[source]
I would argue that not sanitising strings is analogous to a form of memory unsafety. You take as an input, an opaque blob of bytes that you then pass on to a myriad of other libraries and pieces of code. Nothing is captured in the types other than "String". Mainstream programming languages need to make it easier to define new types and parse strings into them. Rust is very promising in this area, as it features algebraic data types.