[Git][NTPsec/ntpsec][master] Repair code for interpreting 'g' suffix.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Aug 17 17:36:29 UTC 2019
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
a62b6d98 by Eric S. Raymond at 2019-08-17T17:36:02Z
Repair code for interpreting 'g' suffix.
- - - - -
1 changed file:
- ntpd/ntp_scanner.c
Changes:
=====================================
ntpd/ntp_scanner.c
=====================================
@@ -664,21 +664,21 @@ is_double(
return true;
/* There is still more input, read the exponent */
- if ('e' == tolower((uint8_t)lexeme[i]))
+ if ('e' == tolower((uint8_t)lexeme[i])) {
i++;
- else
- return false;
- /* Read an optional Sign */
- if ('+' == lexeme[i] || '-' == lexeme[i])
- i++;
+ /* Read an optional Sign */
+ if ('+' == lexeme[i] || '-' == lexeme[i])
+ i++;
- /* Now read the exponent part */
- while (lexeme[i] && isdigit((uint8_t)lexeme[i]))
- i++;
+ /* Now read the exponent part */
+ while (lexeme[i] && isdigit((uint8_t)lexeme[i]))
+ i++;
+
+ }
/* Allow trailing multipliers */
- while (ERA_SUFFIX(lexeme[i]))
+ while (lexeme[i] && ERA_SUFFIX(lexeme[i]))
i++;
/* Check if we are done */
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a62b6d981d179a4b20963c40023624df6aac40ae
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a62b6d981d179a4b20963c40023624df6aac40ae
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190817/c4ecc63e/attachment-0001.htm>
More information about the vc
mailing list