Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2017 16:18:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-wireless@FreeBSD.org
Subject:   [Bug 224141] possible Off-by-one bug in the Base64 decoding in the wpa supplicant
Message-ID:  <bug-224141-21060-iteem1Y8PJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-224141-21060@https.bugs.freebsd.org/bugzilla/>
References:  <bug-224141-21060@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224141

--- Comment #2 from Ivan Kostov <ikostov@gmail.com> ---
Hi Tim,

I have modified the source code a little bit before using it in my project.=
 As
it turns out I have changed the line=20


static const unsigned char base64_table[65] =3D ....

to=20

static const unsigned char base64_encode_table[] =3D

which allocates indeed one byte less :). Sorry for the time lost :D=20
However I don't find it sexy, to allocate 65 bytes and initialize only 64 of
them and rely on the fact that static variables usually land in the .bss.
The code will work by initializing 64 elements and removing the " -1 " from=
 the
for loop.

Best regards,
Ivan

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224141-21060-iteem1Y8PJ>