Please `#define` the length of `saved_idents` somewhere and use that to calculate the size in the `memset`/`memcpy` calls.