mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Fix UB in cv::error when breakOnError set to true
Fixes #28436. Replaces a nullptr dereference (unguaranteed to cause a SEGFAULT) by `std::terminate` which will call the current `std::terminate_handler` and then SIGARBT.
This commit is contained in:
@@ -1282,8 +1282,7 @@ void error( const Exception& exc )
|
|||||||
|
|
||||||
if(breakOnError)
|
if(breakOnError)
|
||||||
{
|
{
|
||||||
static volatile int* p = 0;
|
std::terminate();
|
||||||
*p = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw exc;
|
throw exc;
|
||||||
|
|||||||
Reference in New Issue
Block a user