Skip to content

Commit 15dbe1a

Browse files
committed
Fix setting EFFECTIVE_GROUP_ID to a list
RT 134486 This is a regression introduced in 5.29.0 by 5d4a52b grok_atoUV: allow non-C strings and document Making sure we backup the end pointer and restore it before calling multiple times grok_atoUV should fix it. URL: https://rt.perl.org/Ticket/Display.html?id=134486
1 parent 92574b8 commit 15dbe1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,6 +3180,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
31803180
Groups_t *gary = NULL;
31813181
const char* p_end = p + len;
31823182
const char* endptr = p_end;
3183+
const char* backup_endptr = endptr;
31833184
UV uv;
31843185
#ifdef _SC_NGROUPS_MAX
31853186
int maxgrp = sysconf(_SC_NGROUPS_MAX);
@@ -3211,6 +3212,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
32113212
Newx(gary, i + 1, Groups_t);
32123213
else
32133214
Renew(gary, i + 1, Groups_t);
3215+
endptr = backup_endptr; /* we know where the end is */
32143216
if (grok_atoUV(p, &uv, &endptr))
32153217
gary[i] = (Groups_t)uv;
32163218
else {

0 commit comments

Comments
 (0)