[tz] defensive value for define on Solaris causes load of timerule to fail
Christos Zoulas
christos at zoulas.com
Mon Jun 12 21:10:18 UTC 2017
On Jun 12, 11:21am, eggert at cs.ucla.edu (Paul Eggert) wrote:
-- Subject: Re: [tz] defensive value for define on Solaris causes load of tim
| return EINVAL;
| if (sizeof lsp->fullname - 1 <=3D strlen(p) + strlen(name))
| return ENAMETOOLONG;
| - strcpy(fullname, p);
| - strcat(fullname, "/");
| - strcat(fullname, name);
| + strcpy(lsp->fullname, p);
| + strcat(lsp->fullname, "/");
| + strcat(lsp->fullname, name);
Why not:
snprintf(lsp->fullname, sizeof(lsp_fullname), "%s/%s", p, name);
and remove more code...
christos
More information about the tz
mailing list