Commit c560ff23 authored by Alexander Alekhin's avatar Alexander Alekhin

videoio: images: fix buffer overflow problem

parent e4985f60
......@@ -345,7 +345,10 @@ bool CvVideoWriter_Images::writeFrame( const IplImage* image )
{
char str[_MAX_PATH];
sprintf(str, filename, currentframe);
int ret = cvSaveImage(str, image, &params[0]);
std::vector<int> image_params = params;
image_params.push_back(0); // append parameters 'stop' mark
image_params.push_back(0);
int ret = cvSaveImage(str, image, &image_params[0]);
currentframe++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment