mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Avoid NULL pointer dereference in isolationtester
This commit is contained in:
parent
00c5f55061
commit
d2a75837cc
@ -406,14 +406,16 @@ run_named_permutations(TestSpec * testspec)
|
|||||||
/* Find all the named steps from the lookup table */
|
/* Find all the named steps from the lookup table */
|
||||||
for (j = 0; j < p->nsteps; j++)
|
for (j = 0; j < p->nsteps; j++)
|
||||||
{
|
{
|
||||||
steps[j] = *((Step **) bsearch(p->stepnames[j], allsteps, nallsteps,
|
Step **this = (Step **) bsearch(p->stepnames[j], allsteps,
|
||||||
sizeof(Step *), &step_bsearch_cmp));
|
nallsteps, sizeof(Step *),
|
||||||
if (steps[j] == NULL)
|
&step_bsearch_cmp);
|
||||||
|
if (this == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "undefined step \"%s\" specified in permutation\n",
|
fprintf(stderr, "undefined step \"%s\" specified in permutation\n",
|
||||||
p->stepnames[j]);
|
p->stepnames[j]);
|
||||||
exit_nicely();
|
exit_nicely();
|
||||||
}
|
}
|
||||||
|
steps[j] = *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
run_permutation(testspec, p->nsteps, steps);
|
run_permutation(testspec, p->nsteps, steps);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user