diff options
author | Karl Williamson <khw@cpan.org> | 2019-11-13 15:39:15 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-12-17 11:19:31 -0700 |
commit | 81d11450691ee281f37c6c4e8055735b972733bd (patch) | |
tree | a5ae0ca505516b3e391102045ab799a32e5d2116 /numeric.c | |
parent | 5162664ad5f98a91d900af385de396cff1a34d47 (diff) | |
download | perl-81d11450691ee281f37c6c4e8055735b972733bd.tar.gz |
PATCH: GH #17367 read 1 beyond end of buffer
This is a bug in grok_infnan() in which in one place it failed to check
that it was reading within bounds.
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -791,6 +791,9 @@ Perl_grok_infnan(pTHX_ const char** sp, const char* send) /* "nanq" or "nans" are ok, though generating * these portably is tricky. */ s++; + if (s == send) { + return flags; + } } if (*s == '(') { /* C99 style "nan(123)" or Perlish equivalent "nan($uv)". */ |