Module Name:    src
Committed By:   mrg
Date:           Sat Oct  5 23:30:22 UTC 2019

Modified Files:
        src/usr.sbin/eeprom: eehandlers.c

Log Message:
memcpy->strncpy, and avoid copying beyond the static string length
into potentially unmapped regions.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/eeprom/eehandlers.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/eeprom/eehandlers.c
diff -u src/usr.sbin/eeprom/eehandlers.c:1.18 src/usr.sbin/eeprom/eehandlers.c:1.19
--- src/usr.sbin/eeprom/eehandlers.c:1.18	Tue Jul  2 11:59:46 2013
+++ src/usr.sbin/eeprom/eehandlers.c	Sat Oct  5 23:30:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: eehandlers.c,v 1.18 2013/07/02 11:59:46 joerg Exp $	*/
+/*	$NetBSD: eehandlers.c,v 1.19 2019/10/05 23:30:22 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -530,7 +530,7 @@ doio(const struct keytabent *ktent, u_ch
 
 	buf2 = (u_char *)calloc(1, len);
 	if (buf2 == NULL) {
-		memcpy(err_str, "memory allocation failed", sizeof err_str);
+		strncpy(err_str, "memory allocation failed", sizeof err_str);
 		return (1);
 	}
 

Reply via email to