resuing char pointer bug for removing CET from kernel string

This commit is contained in:
maliakal_d 2022-01-31 09:51:49 +01:00
parent 8d7a55c2df
commit 963e9ee501

View File

@ -74,7 +74,8 @@ int getTimeFromString(char *buf, time_t *result) {
// remove timezone as strptime cannot validate timezone despite // remove timezone as strptime cannot validate timezone despite
// documentation (for blackfin) // documentation (for blackfin)
LOG(logDEBUG, ("kernel v %s\n", buffer)); LOG(logDEBUG, ("kernel v %s\n", buffer));
char *timezone = {"CEST"}; char timezone[8] = {0};
strcpy(timezone, "CEST");
char *res = strstr(buffer, timezone); char *res = strstr(buffer, timezone);
// remove CET as well // remove CET as well
if (res == NULL) { if (res == NULL) {