diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-05-17 18:31:04 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-05-17 18:31:04 +0000 |
commit | af8276aa82e554f2bb6d1a65a330ee1ccc344050 (patch) | |
tree | 09f8c2c1b9c3ed6dd54b573c626f2c1d2b67535f | |
parent | c713b6d5ff450e3554a4329d345a21c5d01706c6 (diff) |
Replace suspect strncpy with strlcpy to ensure null termination.
ok tdeval@ deraadt@ miod@
-rw-r--r-- | sys/dev/ic/vga.c | 4 |
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 |