atftp: port a patch from OpenSUSE to fix "Sorcerer's Apprentice Syndrome"(SAS)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>