mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
BUG/MINOR: acme: null pointer dereference upon allocation failure
Reported in issue #3115: 11. var_compare_op: Comparing task to null implies that task might be null. 681 if (!task) { 682 ret++; 683 ha_alert("acme: couldn't start the scheduler!\n"); 684 } CID 1609721: (#1 of 1): Dereference after null check (FORWARD_NULL) 12. var_deref_op: Dereferencing null pointer task. 685 task->nice = 0; 686 task->process = acme_scheduler; 687 688 task_wakeup(task, TASK_WOKEN_INIT); 689 } 690 Task would be dereferenced upon allocation failure instead of falling back to the end of the function after the error. Should be backported in 3.2.
This commit is contained in:
parent
c15129f7dc
commit
66a7ebfeef
@ -681,6 +681,7 @@ static int cfg_postparser_acme()
|
|||||||
if (!task) {
|
if (!task) {
|
||||||
ret++;
|
ret++;
|
||||||
ha_alert("acme: couldn't start the scheduler!\n");
|
ha_alert("acme: couldn't start the scheduler!\n");
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
task->nice = 0;
|
task->nice = 0;
|
||||||
task->process = acme_scheduler;
|
task->process = acme_scheduler;
|
||||||
@ -688,6 +689,7 @@ static int cfg_postparser_acme()
|
|||||||
task_wakeup(task, TASK_WOKEN_INIT);
|
task_wakeup(task, TASK_WOKEN_INIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user