1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +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:
Erellu
2026-01-22 13:26:02 +01:00
committed by GitHub
parent fba658b9a1
commit b201018a25
+1 -2
View File
@@ -1282,8 +1282,7 @@ void error( const Exception& exc )
if(breakOnError)
{
static volatile int* p = 0;
*p = 0;
std::terminate();
}
throw exc;