error: partial base64 value left over

Peter Rathlev peter at rathlev.dk
Wed Jan 26 21:38:08 UTC 2011


On Wed, 2011-01-26 at 12:43 -0800, David Hankins wrote:
> Try adding TOKEN_NO to this section of code in common/parse.c;

Yeah, just found out. :-) And adding TOKEN_NO to the list of valid
base64 tokens solves this specific problem.

> You may want to look for other short tokens that may appear in a
> base64 encoded bitstring (TOKEN_NOT for example seems plausible).  See
> common/conflex.c (function in particular is called 'intern()') or
> includes/dhctoken.h.

But technically a valid base64 string could contain any one of the
elements in intern() that don't contain a hyphen.

I'm thinking more in the line of parsing not "while something base64"
but rather "until something non-base64". It seems peek_token() always
returns with cfile->tval set to the token (courtesy of the inner
get_raw_token()) in question, and parse_base64() already has the
"from64" array to help.

I'll try and write something up around that.

-- 
Peter






More information about the dhcp-users mailing list