diff options
author | ps <ps@FreeBSD.org> | 2000-12-08 05:02:12 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2000-12-08 05:02:12 +0000 |
commit | b9f1a189bc92d2655153b1777fab1e728be86097 (patch) | |
tree | f7e7a79f03c3383725a317be9e41007353fc13c6 /lib/libstand | |
parent | 9286fe07da8f5b14a0ebd2b3885aa7866f64a48c (diff) | |
download | FreeBSD-src-b9f1a189bc92d2655153b1777fab1e728be86097.zip FreeBSD-src-b9f1a189bc92d2655153b1777fab1e728be86097.tar.gz |
When TFTP tries to open a file, it is expecting struct open_file
member f_devdata to be a pointer to a socket number. When currdev
is "pxe", that assumption is correct. When currdev is "disk*", that
assumption is incorrect.
Submitted by: Jim Browne <jbrowne@jbrowne.com>
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/tftp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index e7f885d..3b48173 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -256,6 +256,9 @@ tftp_open(path, f) return (ENOMEM); tftpfile->iodesc = io = socktodesc(*(int *) (f->f_devdata)); + if (io == NULL) + return (EINVAL); + io->destip = servip; tftpfile->off = 0; tftpfile->path = strdup(path); |