dm_strword: fix invalid memory access
Calling this dm_strword with an emtpy 'str' can cause invalid memory access. This commit checks for an empty string.
NOTE: This function is insecure and can cause segfaults when 'str' is larger than 'source'
Signed-off-by: Daniel Danzberger daniel@dd-wrt.com