summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2003-05-17 18:31:03 +0000
committerkrw <krw@openbsd.org>2003-05-17 18:31:03 +0000
commit8bdd2036d23697a826febf35166153a6dcf4eb22 (patch)
treeaf804b7fa59e2e8743ae29e10e966fbc55f35e08
parentMention in the 'status cmd failed' message the scsi command that (diff)
downloadwireguard-openbsd-8bdd2036d23697a826febf35166153a6dcf4eb22.tar.xz
wireguard-openbsd-8bdd2036d23697a826febf35166153a6dcf4eb22.zip
Replace suspect strncpy with strlcpy to ensure null termination.
ok tdeval@ deraadt@ miod@
-rw-r--r--sys/dev/ic/vga.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index 373226c8d09..903049a5aa6 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.30 2002/07/12 20:17:03 mickey Exp $ */
+/* $OpenBSD: vga.c,v 1.31 2003/05/17 18:31:03 krw Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*
@@ -859,7 +859,7 @@ vga_load_font(v, cookie, data)
f = malloc(sizeof(struct vgafont), M_DEVBUF, M_WAITOK);
if (!f)
return (ENOMEM);
- strncpy(f->name, data->name, sizeof(f->name));
+ strlcpy(f->name, data->name, sizeof(f->name));
f->height = data->fontheight;
f->encoding = data->encoding;
#ifdef notyet