mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
resuing char pointer bug for removing CET from kernel string
This commit is contained in:
parent
8d7a55c2df
commit
963e9ee501
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user