summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-05-01 14:23:23 -0600
committerKarl Williamson <khw@cpan.org>2018-06-25 07:33:26 -0600
commit5d4a52b5c68a11bfc97c2e24806993b84a61eade (patch)
tree32adacfa73add58acad66f7a533957d56bd45d11 /mg.c
parent6928bedc792ff80f0cb915460a7eacae25fa9bdd (diff)
downloadperl-5d4a52b5c68a11bfc97c2e24806993b84a61eade.tar.gz
grok_atoUV: allow non-C strings and document
This changes the internal function grok_atoUV() to not require its input to be NUL-terminated. That means the existing calls to it must be changed to set the ending position before calling it, as some did already. This function is recommended to use in a couple of pods, but it wasn't documented in perlintern. This commit does that as well.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index c03bf257ff..b022d63442 100644
--- a/mg.c
+++ b/mg.c
@@ -3170,7 +3170,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
{
const char *p = SvPV_const(sv, len);
Groups_t *gary = NULL;
- const char* endptr;
+ const char* endptr = p + len;
UV uv;
#ifdef _SC_NGROUPS_MAX
int maxgrp = sysconf(_SC_NGROUPS_MAX);