diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-13 01:17:48 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-13 01:17:48 +0200 |
commit | cc001c31a7c2ac9f01c334adb2ff78da59c91436 (patch) | |
tree | 9c75b9c3c14dbf26f8ca1e8292c495976d6ae050 | |
parent | e4d29ea9a7ddc5c5b803ff51ba54baff832b9680 (diff) |
tftpfs: make sure path is null terminated
-rw-r--r-- | sys/src/cmd/ip/tftpfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/tftpfs.c b/sys/src/cmd/ip/tftpfs.c index ed7c70e05..7f1fcb003 100644 --- a/sys/src/cmd/ip/tftpfs.c +++ b/sys/src/cmd/ip/tftpfs.c @@ -53,7 +53,7 @@ tfileget(uchar *addr, char *path) f = emalloc9p(sizeof *f); memset(f, 0, sizeof(*f)); ipmove(f->addr, addr); - strncpy(f->path, path, sizeof(f->path)); + strncpy(f->path, path, Maxpath-1); f->ref = 1; f->id = id++; f->next = files; |