Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2015 19:21:49 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r285851 - stable/10/usr.sbin/bsnmpd/modules/snmp_hostres
Message-ID:  <201507241921.t6OJLn3b078938@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri Jul 24 19:21:48 2015
New Revision: 285851
URL: https://svnweb.freebsd.org/changeset/base/285851

Log:
  MFC	r285719:
  snmp_hostres(3): Fix buffer overflow.
  
  Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches.
  
  CID:		1007594

Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
==============================================================================
--- stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c	Fri Jul 24 19:16:16 2015	(r285850)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c	Fri Jul 24 19:21:48 2015	(r285851)
@@ -175,7 +175,7 @@ get_printer_status(const struct printer 
 		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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507241921.t6OJLn3b078938>