From 7bbe1a53cfc097b82b1589f7915a2120de39274c Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 21 Dec 2017 01:10:24 +0000 Subject: [PATCH] imgcodecs(pxm): fix memcpy size --- modules/imgcodecs/src/grfmt_pxm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgcodecs/src/grfmt_pxm.cpp b/modules/imgcodecs/src/grfmt_pxm.cpp index b8301489b7..2e20d7814f 100644 --- a/modules/imgcodecs/src/grfmt_pxm.cpp +++ b/modules/imgcodecs/src/grfmt_pxm.cpp @@ -333,7 +333,7 @@ bool PxMDecoder::readData( Mat& img ) } } else - memcpy( data, src, CV_ELEM_SIZE1(m_type)*m_width); + memcpy(data, src, img.elemSize1()*m_width); } else {