Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern tftproot_getfile(): return E2BIG when bootfile is t...
details: https://anonhg.NetBSD.org/src/rev/ebf6268962bd
branches: trunk
changeset: 447663:ebf6268962bd
user: bad <bad%NetBSD.org@localhost>
date: Sun Jan 20 21:26:13 2019 +0000
description:
tftproot_getfile(): return E2BIG when bootfile is to long.
tftproot_getfile() must return something != 0 to indicate error when
the bootfile is to long.
error just got set to 0 when nfs_boot_setrecvtimo() was called.
found during code review. compile tested only.
diffstat:
sys/kern/subr_tftproot.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 9d2403caf259 -r ebf6268962bd sys/kern/subr_tftproot.c
--- a/sys/kern/subr_tftproot.c Sun Jan 20 20:22:13 2019 +0000
+++ b/sys/kern/subr_tftproot.c Sun Jan 20 21:26:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_tftproot.c,v 1.22 2018/10/27 09:13:45 mlelstv Exp $ */
+/* $NetBSD: subr_tftproot.c,v 1.23 2019/01/20 21:26:13 bad Exp $ */
/*-
* Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved.
@@ -39,7 +39,7 @@
#include "opt_md.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.22 2018/10/27 09:13:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.23 2019/01/20 21:26:13 bad Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -246,6 +246,7 @@
if (packetlen > MSIZE) {
DPRINTF(("%s():%d boot filename too long (%ld bytes)\n",
__func__, __LINE__, (long)namelen));
+ error = E2BIG;
goto out;
}
Home |
Main Index |
Thread Index |
Old Index