From 2288d57f5b59aa20f8c96fef5e0b4529ef14053a Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Mon, 24 May 1999 15:15:33 +0000 Subject: fix buf oflow --- sys/arch/i386/isa/pcvt/Util/cursor/cursor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386/isa/pcvt') diff --git a/sys/arch/i386/isa/pcvt/Util/cursor/cursor.c b/sys/arch/i386/isa/pcvt/Util/cursor/cursor.c index 09e27d094f2..8921949d927 100644 --- a/sys/arch/i386/isa/pcvt/Util/cursor/cursor.c +++ b/sys/arch/i386/isa/pcvt/Util/cursor/cursor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cursor.c,v 1.5 1999/01/13 07:26:03 niklas Exp $ */ +/* $OpenBSD: cursor.c,v 1.6 1999/05/24 15:15:32 aaron Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis @@ -117,7 +117,7 @@ char *argv[]; { char buffer[80]; strcpy(buffer,"ERROR opening "); - strcat(buffer,device); + strncat(buffer,device,sizeof(buffer) - strlen(buffer)); perror(buffer); exit(1); } @@ -131,7 +131,7 @@ char *argv[]; { char buffer[80]; strcpy(buffer,"ERROR opening "); - strcat(buffer,device); + strncat(buffer,device,sizeof(buffer) - strlen(buffer)); perror(buffer); exit(1); } -- cgit v1.2.3