summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsnmpd
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-07-20 16:08:01 +0000
committerpfg <pfg@FreeBSD.org>2015-07-20 16:08:01 +0000
commita38006731b7389f3e1992ae4eafbed599b544de4 (patch)
treeb86dfc268386f6fc78677a693cb52198de8827cf /usr.sbin/bsnmpd
parent3200268ec4df725822010e75451026a180f38273 (diff)
downloadFreeBSD-src-a38006731b7389f3e1992ae4eafbed599b544de4.zip
FreeBSD-src-a38006731b7389f3e1992ae4eafbed599b544de4.tar.gz
snmp_hostres(3): Fix buffer overflow.
Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 MFC after: 3 days
Diffstat (limited to 'usr.sbin/bsnmpd')
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
index 883d67a..33a54b5 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
@@ -175,7 +175,7 @@ get_printer_status(const struct printer *pp)
goto LABEL_DONE;
}
- memset(&fline[0], '\0', sizeof(line));
+ memset(&fline[0], '\0', sizeof(fline));
if (fgets(fline, sizeof(fline) -1, f) == NULL) {
ps = PS_UNKNOWN;
goto LABEL_DONE;
OpenPOWER on IntegriCloud