make_passwd: only use 'inlen' bytes of the input string
authorNiko Tyni <ntyni@cc.helsinki.fi>
Wed, 20 May 2009 09:11:19 +0000 (12:11 +0300)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 20 May 2009 12:04:38 +0000 (14:04 +0200)
commit867374dace03b36de84a45553488333bc8199ecc
tree62e71ad270481f26d6ca0090b48e6f933250d038
parent1c205a5dce0e4d2980a084b87b7bb18decba8427
make_passwd: only use 'inlen' bytes of the input string

In some situations (at least a roundtrip through the rlm_perl module)
the User-Password value pair can have extra non-null bytes at the end
so that strlen(vp->data.strvalue) > vp->length.

These extra bytes shold not be used by make_passwd to construct the
Message-Authenticator, so copy just 'inlen' bytes of the input string
before rounding up the length.
src/lib/radius.c