aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-06-21 00:18:08 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-06-21 00:18:08 -0700
commit2a3c031ec81742c977a8c7116a97bfa1a766443c (patch)
tree5259dbc1ceb08407c454d9aa81b5b314387ed337
parent9ab68ade0a76d2cb3b3ae2f917bbd266c02e2f18 (diff)
downloadsyslinux-2a3c031ec81742c977a8c7116a97bfa1a766443c.tar.gz
syslinux-2a3c031ec81742c977a8c7116a97bfa1a766443c.tar.xz
syslinux-2a3c031ec81742c977a8c7116a97bfa1a766443c.zip
pxe: properly null-terminate packet after tftp://
Properly null-terminate the output from a parsed tftp:// URL. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/fs/pxe/pxe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index a94a8d0d..26b6a01c 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -477,7 +477,7 @@ static void fill_buffer(struct inode *inode)
{
int err;
int last_pkt;
- const uint8_t *timeout_ptr = TimeoutTable;
+ const uint8_t *timeout_ptr;
uint8_t timeout;
uint16_t buffersize;
uint32_t oldtime;
@@ -730,6 +730,7 @@ static void pxe_searchdir(const char *filename, struct file *file)
*buf++ = *np++;
}
}
+ *buf = '\0';
break;
}