Fix a heap-buffer-overflow issue. 82/289382/2
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 7 Mar 2023 02:03:07 +0000 (10:03 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Tue, 14 Mar 2023 06:47:14 +0000 (14:47 +0800)
Change-Id: I700ea4b211ac7e2cb9a8618d7cc86eb8482719df

automated-tests/src/dali-adaptor/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;