mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Assert on args to padnamelist_dup() before trying to use them
This commit is contained in:
parent
fb4d3f55c4
commit
162b6fd168
7
pad.c
7
pad.c
@ -2744,13 +2744,12 @@ Duplicates a pad name list.
|
||||
PADNAMELIST *
|
||||
Perl_padnamelist_dup(pTHX_ PADNAMELIST *srcpad, CLONE_PARAMS *param)
|
||||
{
|
||||
PADNAMELIST *dstpad;
|
||||
SSize_t max = PadnamelistMAX(srcpad);
|
||||
|
||||
PERL_ARGS_ASSERT_PADNAMELIST_DUP;
|
||||
|
||||
SSize_t max = PadnamelistMAX(srcpad);
|
||||
|
||||
/* look for it in the table first */
|
||||
dstpad = (PADNAMELIST *)ptr_table_fetch(PL_ptr_table, srcpad);
|
||||
PADNAMELIST *dstpad = (PADNAMELIST *)ptr_table_fetch(PL_ptr_table, srcpad);
|
||||
if (dstpad)
|
||||
return dstpad;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user