scc = scc_sv;
sct = sct_sv;
sc_tokid = sc_tokid_sv;
- sprintf(sc_token, "%d", hour);
+ snprintf(sc_token, sc_len, "%d", hour);
return TIME_OK;
}
if (sc_tokid == COLON) {
scc = scc_sv;
sct = sct_sv;
sc_tokid = sc_tokid_sv;
- sprintf(sc_token, "%d", hour);
+ snprintf(sc_token, sc_len, "%d", hour);
return TIME_OK;
}
ptv->tm. tm_hour = hour;
{
/* using time_t seems to help portability with 64bit oses */
time_t mday = 0, wday, mon, year = ptv->tm.tm_year;
- int tlen;
switch (sc_tokid) {
case YESTERDAY:
case NUMBER:
/* get numeric <sec since 1970>, MM/DD/[YY]YY, or DD.MM.[YY]YY
*/
- tlen = strlen(sc_token);
mon = atol(sc_token);
if (mon > 10 * 365 * 24 * 60 * 60) {
ptv->tm = *localtime(&mon);