[Git][NTPsec/ntpsec][master] libparse/clk_sel240x.c: NULL pointer dereference in cvt_sel240x()
Matt Selsky (@selsky)
gitlab at mg.gitlab.com
Tue Nov 17 03:27:58 UTC 2026
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
94bcf272 by Gary E. Miller at 2026-11-17T03:25:58+00:00
libparse/clk_sel240x.c: NULL pointer dereference in cvt_sel240x()
Closes #904
- - - - -
1 changed file:
- libparse/clk_sel240x.c
Changes:
=====================================
libparse/clk_sel240x.c
=====================================
@@ -119,11 +119,12 @@ cvt_sel240x( unsigned char *buffer,
UNUSED_ARG(local);
if( Strok(buffer, format->fixed_string) ) {
- struct tm ptime;
+ struct tm ptime = {0};
buffer++;
buffer = (unsigned char *)strptime(
(const char *)buffer, "%Y:%j:%H:%M:%S", &ptime );
- if( *(buffer+1) != '\x0d' ) {
+ if (NULL == buffer ||
+ '\x0d' != *(buffer+1) ) {
rc = CVT_FAIL | CVT_BADFMT;
} else {
clock_time->day = ptime.tm_mday;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/94bcf272fb9f1626aaf52e3c9372e08e6a794b7a
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/94bcf272fb9f1626aaf52e3c9372e08e6a794b7a
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20261117/cf3f8b48/attachment-0001.htm>
More information about the vc
mailing list