File 0150-2169607-strcpy.patch of Package sblim-sfcb

Index: sqlLexer.l
===================================================================
RCS file: /cvsroot/sblim/sfcb/sqlLexer.l,v
retrieving revision 1.3
diff -u -p -r1.3 sqlLexer.l
--- sqlLexer.l	20 Nov 2005 17:43:55 -0000	1.3
+++ sqlLexer.l	15 Oct 2008 21:44:20 -0000
@@ -64,7 +64,8 @@ IDENT_CHAR [A-Za-z_]
 
 
 \n.* {
-	strcpy(linebuf, yytext+1);//save next line	
+	strncpy(linebuf, yytext+1, MAXBUF);//save next line	
+        linebuf[MAXBUF - 1] = '\0'; // make sure the string is null terminated
 	lineno++;
 	tokenpos = 0;
 	yyless(1);//alles außer dem \n zum erneuten Scannen zurückgeben
openSUSE Build Service is sponsored by