From: Hans-Bernhard B. <br...@us...> - 2004-02-14 18:31:52
|
Update of /cvsroot/cscope/cscope/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1344/src Modified Files: command.c Log Message: Fix off-by-one in limited-size sscanf(). Index: command.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/command.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** command.c 8 Jan 2004 14:07:20 -0000 1.20 --- command.c 14 Feb 2004 18:25:15 -0000 1.21 *************** *** 867,871 **** fcnlen = 8; /* strlen("Function") */ numlen = 0; ! while ((i = fscanf(refsfound, "%250s%250s%6s %5000[^\n]", file, function, linenum, tempstring)) != EOF) { if (i != 4 || --- 867,871 ---- fcnlen = 8; /* strlen("Function") */ numlen = 0; ! while ((i = fscanf(refsfound, "%250s%250s%5s %5000[^\n]", file, function, linenum, tempstring)) != EOF) { if (i != 4 || |