Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcad52b9

Browse files
committed
Make sure a line is read when calling jpeg_read_scanlines
1 parent53f5127 commitcad52b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎modules/imgcodecs/src/grfmt_jpeg.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ bool JpegDecoder::readData( Mat& img )
499499
for(int iy =0 ; iy < m_height; iy ++ )
500500
{
501501
uchar* data = img.ptr<uchar>(iy);
502-
jpeg_read_scanlines( cinfo, &data,1 );
502+
if (jpeg_read_scanlines( cinfo, &data,1 ) !=1)return result;
503503
}
504504
}
505505
else
@@ -510,7 +510,7 @@ bool JpegDecoder::readData( Mat& img )
510510
for(int iy =0 ; iy < m_height; iy ++ )
511511
{
512512
uchar* data = img.ptr<uchar>(iy);
513-
jpeg_read_scanlines( cinfo,buffer,1 );
513+
if (jpeg_read_scanlines( cinfo,&data,1 ) !=1)return result;
514514

515515
if( color )
516516
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp