I got tired of cpufreqd-2-4-2 crashing so have come up with a patch that works for me. I believe it is correct and complete.
The main problem is that the library call realpath() requires a pointer to a buffer that is PATH_MAX bytes long. PAH_MAX is 4096 (for me at least). The buffer being passed in was 512 bytes.
My patch makes the buffers cpufreqd uses for paths use the constant PATH_MAX. It also increases the max string length from 256 bytes to 1024 bytes, which is not necessary but seems useful, and finally fixes one instance of a string-type buffer using a hard coded constant 256 rather than the #define used elsewhere.