diff options
-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); |