Skip to content

Commit

Permalink
Fixed a compilation error dur to buffer sizes in release compilation …
Browse files Browse the repository at this point in the history
…mode
  • Loading branch information
kzangeli committed Jan 11, 2024
1 parent 88426e5 commit 5886c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/orionld/common/dateTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ double dateTimeFromString(const char* iso8601String, char* errorString, int erro
if (tzStart == NULL) tzStart = strchr(T, '-');

if (tzStart == NULL)
strncpy(timeString, T, sizeof(timeString));
strncpy(timeString, T, sizeof(timeString) - 1);
else
{
strncpy(timezoneString, tzStart, sizeof(timezoneString));
strncpy(timezoneString, tzStart, sizeof(timezoneString) - 1);
*tzStart = 0;
strncpy(timeString, T, sizeof(timeString));
strncpy(timeString, T, sizeof(timeString) - 1);
}
}

Expand Down

0 comments on commit 5886c02

Please sign in to comment.