Page MenuHomeFreeBSD

Fix b64_pton output buffer overrun test for exact-sized buffer

Authored by emaste on Nov 24 2014, 4:51 PM.
Referenced Files
Unknown Object (File)
Apr 27 2017, 5:00 AM
Unknown Object (File)
Apr 21 2017, 7:47 PM
Unknown Object (File)
Apr 17 2017, 9:10 PM
Unknown Object (File)
Jan 27 2017, 10:03 AM
Unknown Object (File)
Nov 16 2016, 2:08 PM
Unknown Object (File)
Oct 1 2016, 6:56 PM
Unknown Object (File)
Feb 19 2016, 2:30 PM
Unknown Object (File)
Feb 1 2016, 6:47 PM



Submitted by: Ted Unangst
Obtained from: OpenBSD

Diff Detail

rS FreeBSD src repository - subversion
Lint Skipped
Tests Skipped

Event Timeline

emaste retitled this revision from to Fix b64_pton output buffer overrun test for exact-sized buffer.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: trasz.

For posterity, Ted's note to freebsd-hackers@:

From inspection, it appears FreeBSD's libc base64.c will sometimes erroneously fail to decode a base64 string into a precisely sized buffer. The overflow check is a little too greedy. The same bug was fixed in OpenBSD; it would be helpful if FreeBSD adopted the fix as well. :)

loos added a reviewer: loos.
loos added a subscriber: loos.

I can easily reproduce the problem and the patch does fix it.

Please, go ahead.

This revision is now accepted and ready to land.Nov 25 2014, 1:32 PM

I don't see anything wrong with the patch, but my understanding of this code is rather poor.

trasz edited edge metadata.
emaste updated this revision to Diff 2546.

Closed by commit rS275060 (authored by @emaste).