Solution to issue #7408
authorArkadiuszRaj <arek@raj.priv.pl>
Fri, 7 Oct 2016 19:29:08 +0000 (21:29 +0200)
committerArkadiuszRaj <arek@raj.priv.pl>
Fri, 7 Oct 2016 19:29:08 +0000 (21:29 +0200)
modules/imgcodecs/src/grfmt_pxm.cpp

index 051922d..8afd7b1 100644 (file)
@@ -309,7 +309,7 @@ bool  PxMDecoder::readData( Mat& img )
                         }
                     }
                     else
-                        memcpy( data, src, m_width);
+                        memcpy( data, src, CV_ELEM_SIZE1(m_type)*m_width);
                 }
                 else
                 {