pcre: added various null checks
check for map prior to redefining buffer for cli_pcre_scanbuf