ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/ot/wfconv.c
(Generate patch)

Comparing ray/src/ot/wfconv.c (file contents):
Revision 2.8 by schorsch, Sat Mar 27 12:41:45 2004 UTC vs.
Revision 2.9 by greg, Fri Apr 23 16:20:56 2004 UTC

# Line 15 | Line 15 | typedef int    VNDX[3];        /* vertex index (point,map,normal
15  
16   #define CHUNKSIZ        1024    /* vertex allocation chunk size */
17  
18 < #define MAXARG          64      /* maximum # arguments in a statement */
18 > #define MAXARG          512     /* maximum # arguments in a statement */
19  
20   static FVECT    *vlist;         /* our vertex list */
21   static int      nvs;            /* number of vertices in our list */
# Line 176 | Line 176 | getstmt(                               /* read the next statement from fp */
176                                          lineno++;
177                                  *cp++ = '\0';
178                          }
179 <                        if (!*cp || i >= MAXARG-1)
179 >                        if (!*cp)
180                                  break;
181 +                        if (i >= MAXARG-1) {
182 +                                sprintf(errmsg,
183 +                        "%s: too many arguments near line %d (limit %d)\n",
184 +                                        inpfile, lineno+1, MAXARG-1);
185 +                                break;
186 +                        }
187                          av[i++] = cp;
188                          while (*++cp && !isspace(*cp))
189                                  ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines