fix parsing of "challenge" regarding NUL byte

This commit is contained in:
Rudolf Polzer 2010-09-17 07:33:53 +02:00
parent c445176a36
commit 67a864dd70
2 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ sub recvchallenge($)
if not defined $s;
length $s
or last;
if($s =~ /^\377\377\377\377challenge (.*)$/s)
if($s =~ /^\377\377\377\377challenge (.*?)(?:$|\0)/s)
{
return $1;
}

View File

@ -514,7 +514,7 @@ sub recvchallenge($)
if not defined $s;
length $s
or last;
if($s =~ /^\377\377\377\377challenge (.*)$/s)
if($s =~ /^\377\377\377\377challenge (.*)(?:$|\0)/s)
{
return $1;
}