Imgcodecs: Fixed a bug with checkSignature in GdalDecoder
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.

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv