Return on error
Use sizeof instead of strlen
Use strlcpy instead of strcpy
Correct args to memset
Error if the dictionaries weren't initialized
Check array[0], not array