Memory-safe C code
Memory-safe C code
Posted Dec 13, 2025 23:48 UTC (Sat) by sammythesnake (guest, #17693)In reply to: Memory-safe C code by alx.manpages
Parent article: Rust in Android: move fast and fix things (Google Security Blog)
I'm not a C programmer* but I have aa feeling that you still have problems with the following:
int a[] = []; /* or however you spell this in C */ j(0, a)
because
a[countof{a} - 1] is out of bounds, right?
* By firm choice - every time I even think about C, I'm bemused that anyone would choose a language apparently composed entirely of foot guns. If I ever need anything closer to the iron then higher level languages, I'll go for rust, but I've never had enough reason to actually learn it properly so far. YMMV, of course!
