#72·c4

10 = 666; considered legal

Author: tommythornCreated Sep 5, 2022Updated Sep 5, 2022

I cut my teeth on Small-C eons ago and c4 is an absolute delight and very clever. However, I did think the lvalue trick looked too fragile and indeed, if you generate just the right constant, like 9 or 10, you can trick it.

int main(int argc, char **argv) {
    10 = 666;
}

This compiles and will lead to stack corruption.

Definitely not hard to fix and probably not worthwhile.