From af8276aa82e554f2bb6d1a65a330ee1ccc344050 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 17 May 2003 18:31:04 +0000 Subject: Replace suspect strncpy with strlcpy to ensure null termination. ok tdeval@ deraadt@ miod@ --- sys/dev/ic/vga.c | 4 ++-- 1 file 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 -- cgit v1.2.3