Maybe, in some other part of your code, welcome_str is set to NULL or an invalid pointer?