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

Comparing ray/src/cal/rcalc.c (file contents):
Revision 1.8 by schorsch, Fri Aug 1 14:14:23 2003 UTC vs.
Revision 1.9 by greg, Wed Nov 5 19:03:03 2003 UTC

# Line 147 | Line 147 | char  *argv[]
147                                          nbicols = atoi(argv[i]+3);
148                                  else
149                                          nbicols = 1;
150 +                                if (nbicols*sizeof(double) > INBSIZ) {
151 +                                        eputs(argv[0]);
152 +                                        eputs(": too many input columns\n");
153 +                                        quit(1);
154 +                                }
155                                  break;
156                          case 'f':
157                                  if (isdigit(argv[i][3]))
158                                          nbicols = -atoi(argv[i]+3);
159                                  else
160                                          nbicols = -1;
161 +                                if (-nbicols*sizeof(float) > INBSIZ) {
162 +                                        eputs(argv[0]);
163 +                                        eputs(": too many input columns\n");
164 +                                        quit(1);
165 +                                }
166                                  break;
167                          default:
168                                  goto userr;
# Line 646 | Line 656 | register struct field  *f
656                          delim = f->next->f.sl[0];
657                  cp = buf;
658                  do {
659 <                        if (ipb.chr == EOF)
659 >                        if (ipb.chr == EOF || ipb.chr == '\n')
660                                  inword = 0;
661                          else if (blnkeq && delim != EOF)
662                                  inword = isblnk(delim) ?

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines