[BACK]Return to run.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/run.c between version 1.78 and 1.79

version 1.78, 2023/09/20 16:49:13 version 1.79, 2023/10/06 22:29:24
Line 2587 
Line 2587 
         fa *pfa;          fa *pfa;
         int mflag, tempstat, num;          int mflag, tempstat, num;
         int bufsz = recsize;          int bufsz = recsize;
           int charlen = 0;
   
         if ((buf = (char *) malloc(bufsz)) == NULL)          if ((buf = (char *) malloc(bufsz)) == NULL)
                 FATAL("out of memory in gsub");                  FATAL("out of memory in gsub");
Line 2628 
Line 2629 
                                 if (*t == '\0') /* at end */                                  if (*t == '\0') /* at end */
                                         goto done;                                          goto done;
                                 adjbuf(&buf, &bufsz, 2+pb-buf, recsize, &pb, "gsub");                                  adjbuf(&buf, &bufsz, 2+pb-buf, recsize, &pb, "gsub");
                                 *pb++ = *t++;                                  charlen = u8_nextlen(t);
                                   while (charlen-- > 0)
                                           *pb++ = *t++;
                                 if (pb > buf + bufsz)   /* BUG: not sure of this test */                                  if (pb > buf + bufsz)   /* BUG: not sure of this test */
                                         FATAL("gsub result0 %.30s too big; can't happen", buf);                                          FATAL("gsub result0 %.30s too big; can't happen", buf);
                                 mflag = 0;                                  mflag = 0;

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79