Use correct length for buffer.

Submitted by:	Sascha Wildner <swildner dragonflybsd org>
MFC after:	2 weeks