Remix.run Logo
trashb 3 hours ago

Can you elaborate on the statement "Anything involving C string handling is fundamentally security hostile"?

lou1306 an hour ago | parent | next [-]

As soon as you forget (or your adversary manages to delete) an \0 at the end of any string, you may induce buffer overflows, get the application to leak secrets, and so on. Several standard library functions related to strings are prone to timing attacks, or have weird semantics that may expose you to attack. If you roll your own security-related functions (typical example: a scrubber for strings that hold secrets), you need to make sure these do not get optimised away by the compiler.

There's an awful lot of pitfalls and footguns in there.

draw_down 7 minutes ago | parent | prev [-]

[dead]