- just avoids manual termination, no new fixes here..
/* Localize. Erase parsed string */
q = alloca((pe-p) + 1);
- strncpy(q, p, pe-p);
- q[pe-p] = '\0';
+ rstrlcpy(q, p, pe-p);
while (p <= pe)
*p++ = ' ';
/* Localize. Erase parsed string */
q = alloca((pe-p) + 1);
- strncpy(q, p, pe-p);
- q[pe-p] = '\0';
+ rstrlcpy(q, p, pe-p);
while (p <= pe)
*p++ = ' ';
/* Localize. Erase parsed string */
q = alloca((pe-p) + 1);
- strncpy(q, p, pe-p);
- q[pe-p] = '\0';
+ rstrlcpy(q, p, pe-p);
while (p <= pe)
*p++ = ' ';
/* Localize. Erase parsed string. */
q = alloca((pe-p) + 1);
- strncpy(q, p, pe-p);
- q[pe-p] = '\0';
+ rstrlcpy(q, p, pe-p);
while (p <= pe)
*p++ = ' ';
/* Localize. Erase parsed string. */
q = alloca((pe-p) + 1);
- strncpy(q, p, pe-p);
- q[pe-p] = '\0';
+ rstrlcpy(q, p, pe-p);
while (p <= pe)
*p++ = ' ';
fl->currentLangs = xrealloc(fl->currentLangs,
(fl->nLangs + 1) * sizeof(*fl->currentLangs));
newp = xmalloc( np+1 );
- strncpy(newp, p, np);
- newp[np] = '\0';
+ rstrlcpy(newp, p, np);
fl->currentLangs[fl->nLangs++] = newp;
if (*pe == ',') pe++; /* skip , if present */
}