Fixing bounds issue due to strdup replacement for mingw not handling NULL