mirror of
https://github.com/opencv/opencv.git
synced 2025-07-26 07:07:37 +08:00
videoio: images: fix buffer overflow problem
This commit is contained in:
parent
e4985f604a
commit
c560ff23ad
@ -345,7 +345,10 @@ bool CvVideoWriter_Images::writeFrame( const IplImage* image )
|
|||||||
{
|
{
|
||||||
char str[_MAX_PATH];
|
char str[_MAX_PATH];
|
||||||
sprintf(str, filename, currentframe);
|
sprintf(str, filename, currentframe);
|
||||||
int ret = cvSaveImage(str, image, ¶ms[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++;
|
currentframe++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user