[jancy] bugfix: strlen should FIRST check the range, then NULL
[jancy] bugfix: strlen should FIRST check the range, then NULL

subtle bug, discovered by GCC address sanitizer

vovkos/jancy,vovkos/jancy,vovkos/jancy,vovkos/jancy,vovkos/jancy