Imgcodecs: Fixed a bug with checkSignature in GdalDecoder
authorDimitrios Katsaros <patcherwork@gmail.com>
Sun, 14 Aug 2016 20:17:55 +0000 (22:17 +0200)
committerDimitrios Katsaros <patcherwork@gmail.com>
Tue, 6 Sep 2016 13:47:22 +0000 (15:47 +0200)
commit4e513a3346fb647f49fdbf9849328fcc8c691a54
tree7c9870a7cf9432a9cc904a2519860f7e8880a8b3
parent6172803012c679ec345c2e91207874d72ec62a89
Imgcodecs: Fixed a bug with checkSignature in GdalDecoder

In cases where the signaure string contains a terminating character,
the std::string member function size returns a smaller value than the
allocated string. In these cases, if you then try to use substr,
you will get an out_of_range exception. This patch remedies the problem.
modules/imgcodecs/src/grfmt_gdal.cpp