projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcbed8d
)
fix medianBlur accessviolation
author
Jejos
<jens.j.schulz@web.de>
Tue, 28 Feb 2017 07:31:28 +0000
(08:31 +0100)
committer
Jejos
<jens.j.schulz@web.de>
Tue, 28 Feb 2017 07:31:28 +0000
(08:31 +0100)
medianBlur called with "empty" source and ksize >= 7 crashes application with accessviolation. With this extra assert this is avoided and the application may normally catch the thrown exception.
modules/imgproc/src/smooth.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/smooth.cpp
b/modules/imgproc/src/smooth.cpp
index
d8514da
..
7efa56c
100644
(file)
--- a/
modules/imgproc/src/smooth.cpp
+++ b/
modules/imgproc/src/smooth.cpp
@@
-3494,7
+3494,7
@@
void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 ));
- if( ksize <= 1 )
+ if( ksize <= 1
|| _src0.empty()
)
{
_src0.copyTo(_dst);
return;