jpa:
I've never had menuconfig segfault on me, so apparently it works. Yeah, code is overly complex and a bit unreadable, but that applies to a lot of old open-source C code.
I also wouldn't consider menuconfig as a part of the kernel.
The compiler isn't doing its job if you think this works. The definition is "const char *title," which means title is a pointer to a const string. The assignment to title[offset] shouldn't be allowed at all.
My compiler definitely objects: \const_test.cpp(12): error C2166: l-value specifies const object
So, tell me again how this works?