Replace sizeof with strlen when using with pointer to char array.