wcstombs
doesn't magically allocate space in the ENTRY
structure's key
field; you have to do that yourself:
ENTRY e;
size_t len = wcslen(word);
size_t nbytes = wcstombs(NULL, word, 0) + 1;
e.key = malloc(nbytes);
// check for errors
wcstombs(e.key, word, nbytes);
Don't forget to free
afterwards.