[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

src/sbin/raidctl/rf_configure.c sscanf(...%s...) limit



% grep buf1 rf_configure.c
  char buf[256], buf1[256], *cp;

Index: rf_configure.c
===================================================================
RCS file: /cvs/src/sbin/raidctl/rf_configure.c,v
retrieving revision 1.11
diff -u -r1.11 rf_configure.c
--- rf_configure.c	13 Mar 2003 09:09:27 -0000	1.11
+++ rf_configure.c	13 Nov 2003 06:43:59 -0000
@@ -220,7 +220,7 @@
 	/* the queue specifier line contains two entries: 1st char of first
 	 * word specifies queue to be used 2nd word specifies max num reqs
 	 * that can be outstanding on the disk itself (typically 1) */
-  if (sscanf(buf,"%s %d",buf1,&val)!=2) {
+  if (sscanf(buf, "%256s %d", buf1, &val)!=2) {
     RF_ERRORMSG1("Can't determine queue type and/or max outstanding reqs from line: %s",buf);
     RF_ERRORMSG2("Using %s-%d\n", cfgPtr->diskQueueType, cfgPtr->maxOutstandingDiskReqs);
   } else {