OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
CVS: cvs.openbsd.org: src

From: Kenneth R Westerback (krwcvs.openbsd.org)
Date: Sun Mar 01 2009 - 18:00:56 CST


CVSROOT: /cvs
Module name: src
Changes by: krwcvs.openbsd.org 2009/03/01 17:00:56

Modified files:
        sys/lib/libsa : tftp.c tftp.h

Log message:
Send valid ERROR packets to prematurely terminate a transfer.

According to RFC1350 there should be always be a terminating NUL.
Andre Gillibert on bugs pointed out that the misformed packets
caused Gentoo Linux's tftpd (atftpd) to crash trying to transfer
pxeboot to an OpenBSD machine.

This is slightly different diff than the one proposed by Andre, but
he confirms it also fixes the problem.

"looks like a better diff to me" deraadt.