[#2212] CID26261:

Sanitized input better. may satisfy coverity.