[BACK]Return to roff.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/roff.c between version 1.245 and 1.246

version 1.245, 2014/12/25 17:23:32 version 1.246, 2014/12/28 14:16:26
Line 651  roff_res(struct roff *r, struct buf *buf, int ln, int 
Line 651  roff_res(struct roff *r, struct buf *buf, int ln, int 
                             r->parse, ln, (int)(stesc - buf->buf),                              r->parse, ln, (int)(stesc - buf->buf),
                             "%.*s", (int)naml, stnam);                              "%.*s", (int)naml, stnam);
                         res = "";                          res = "";
                   } else if (buf->sz + strlen(res) > SHRT_MAX) {
                           mandoc_msg(MANDOCERR_ROFFLOOP, r->parse,
                               ln, (int)(stesc - buf->buf), NULL);
                           return(ROFF_IGN);
                 }                  }
   
                 /* Replace the escape sequence by the string. */                  /* Replace the escape sequence by the string. */
Line 658  roff_res(struct roff *r, struct buf *buf, int ln, int 
Line 662  roff_res(struct roff *r, struct buf *buf, int ln, int 
                 *stesc = '\0';                  *stesc = '\0';
                 buf->sz = mandoc_asprintf(&nbuf, "%s%s%s",                  buf->sz = mandoc_asprintf(&nbuf, "%s%s%s",
                     buf->buf, res, cp) + 1;                      buf->buf, res, cp) + 1;
   
                 if (buf->sz > SHRT_MAX) {  
                         mandoc_msg(MANDOCERR_ROFFLOOP, r->parse,  
                             ln, (int)(stesc - buf->buf), NULL);  
                         return(ROFF_IGN);  
                 }  
   
                 /* Prepare for the next replacement. */                  /* Prepare for the next replacement. */
   

Legend:
Removed from v.1.245  
changed lines
  Added in v.1.246

CVSweb