(perl #134169) mg.c reset endptr after use
Perl_grok_atoUV has been changed so endptr constraints the input. Thus we need to reset the endptr after every use. Bug: https://rt.perl.org/Public/Bug/Display.html?id=134169 Bug-Debian: https://bugs.debian.org/941985 Origin: backport, http://perl5.git.perl.org/perl.git/commitdiff/79e302e6c3f815bf4cb72a5bacc3012595970db9 Gbp-Pq: Topic fixes Gbp-Pq: Name gid-parsing.diff
This commit is contained in:
parent
1ca5f5e60d
commit
34111d2329
4
mg.c
4
mg.c
|
@ -3178,7 +3178,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
|
||||||
{
|
{
|
||||||
const char *p = SvPV_const(sv, len);
|
const char *p = SvPV_const(sv, len);
|
||||||
Groups_t *gary = NULL;
|
Groups_t *gary = NULL;
|
||||||
const char* endptr = p + len;
|
const char* p_end = p + len;
|
||||||
|
const char* endptr = p_end;
|
||||||
UV uv;
|
UV uv;
|
||||||
#ifdef _SC_NGROUPS_MAX
|
#ifdef _SC_NGROUPS_MAX
|
||||||
int maxgrp = sysconf(_SC_NGROUPS_MAX);
|
int maxgrp = sysconf(_SC_NGROUPS_MAX);
|
||||||
|
@ -3201,6 +3202,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
|
||||||
if (endptr == NULL)
|
if (endptr == NULL)
|
||||||
break;
|
break;
|
||||||
p = endptr;
|
p = endptr;
|
||||||
|
endptr = p_end;
|
||||||
while (isSPACE(*p))
|
while (isSPACE(*p))
|
||||||
++p;
|
++p;
|
||||||
if (!*p)
|
if (!*p)
|
||||||
|
|
Loading…
Reference in New Issue