Fix a heap-buffer-overflow issue. 26/289326/5
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 14 Mar 2023 06:06:54 +0000 (14:06 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Tue, 14 Mar 2023 06:06:54 +0000 (14:06 +0800)
Change-Id: I1699b29fcf2b0b5badc8a8e5eebc745527683b78

automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp

index 04d193c..319ec67 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -1214,7 +1214,7 @@ Graphics::UniquePtr<Graphics::Program> TestGraphicsController::CreateProgram(con
       source.resize(graphicsShader->mCreateInfo.sourceSize);
       memcpy(&source[0], graphicsShader->mCreateInfo.sourceData, graphicsShader->mCreateInfo.sourceSize);
 
-      if(!std::equal(source.begin(), source.end(), cacheEntry.shaders[shader.pipelineStage].begin()))
+      if(!std::equal(source.begin(), source.end(), cacheEntry.shaders[shader.pipelineStage].begin(), cacheEntry.shaders[shader.pipelineStage].end()))
       {
         found = false;
         break;