* Fixes an invalid read reported by valgrind.
* Fix an posible overflow
Change-Id: I57ccebb986d209b8d4deba4819b4b3cac8aced24
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
std::string strMatActual;
std::string strMatActual;
- std::string input = objBuffer;
+ std::string input( objBuffer, fileSize );
std::istringstream ss(input);
ss.imbue( std::locale( "C" ) );
std::istringstream ss(input);
ss.imbue( std::locale( "C" ) );
- while( isline >> vet[numIndices] && numIndices < MAX_POINT_INDICES )
+ while( ( numIndices < MAX_POINT_INDICES ) && ( isline >> vet[numIndices] ) )
- std::string input = objBuffer;
+ std::string input( objBuffer, fileSize );
std::istringstream ss(input);
ss.imbue(std::locale("C"));
std::istringstream ss(input);
ss.imbue(std::locale("C"));