From f44fe7b6d273521a9de778300c7f993d25821fc9 Mon Sep 17 00:00:00 2001 From: SebGDev Date: Tue, 20 Jan 2015 15:03:04 +0100 Subject: [PATCH] Memory leak --- core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp b/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp index 8482b1a..493f584 100644 --- a/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp +++ b/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp @@ -399,7 +399,7 @@ void DecodedBitStreamParser::decodeBase256Segment(Ref bits, ostringst throw FormatException("NegativeArraySizeException"); } - char* bytes = new char[count]; + ArrayRef bytes(count); for (int i = 0; i < count; i++) { // Have seen this particular error in the wild, such as at // http://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?MODE=3&D=Fred&PFMT=3&PT=F&X=0.3&O=0&LM=0.2