If `str_a` is NULL, then `offset_a` is -1, and this branch will be taken, and NULL will be passed to `memmove`.  Calling `memmove(..., NULL, 0)` is harmless in many implementations, but it's definitely undefined behavior.