sandbox_pids_file isn't initialized so if get_sandbox_pids_file() returns a string that's >=254 sandbox_pids_file might not be null terminated. char sandbox_pids_file[255]; tmp_string = get_sandbox_pids_file(); strncpy(sandbox_pids_file, tmp_string, sizeof(sandbox_pids_file)-1); later on in the file: tmp_string = get_sandbox_pids_file(); strncpy(sandbox_pids_file, tmp_string, 254); The magic constant is a disaster waiting to happen. Both cases probably should just use the pointer from get_sandbox_pids_file() directly and just free it when they're done instead of putting it into a static array.
in portage cvs atm, please test.
Went out a while back...