diff --git a/test/uitest/test_view_bitmap/ui_test_view_bitmap.cpp b/test/uitest/test_view_bitmap/ui_test_view_bitmap.cpp index 4080dbc3fa2bd5ce08e344f7652cce0402252e66..1191dd909d7d5986d24b3ffe766e415750d67906 100755 --- a/test/uitest/test_view_bitmap/ui_test_view_bitmap.cpp +++ b/test/uitest/test_view_bitmap/ui_test_view_bitmap.cpp @@ -15,7 +15,7 @@ #include "ui_test_view_bitmap.h" -#include +#include "securec.h" #include "common/screen.h" #include "components/ui_label_button.h" @@ -26,7 +26,7 @@ class ViewBitmapListener : public UIView::OnClickListener { public: ViewBitmapListener(UIViewGroup* container, UIImageView* img) : container_(container), img_(img) { - memset(&info_, 0, sizeof(ImageInfo)); + memset_s(&info_, sizeof(ImageInfo), 0, sizeof(ImageInfo)); if ((img != nullptr) && (container != nullptr)) { container->Add(img); img->SetVisible(false); @@ -64,7 +64,7 @@ class ScreenBitmapListener : public UIView::OnClickListener { public: ScreenBitmapListener(UIViewGroup* container, UIImageView* img) : container_(container), img_(img) { - memset(&info_, 0, sizeof(ImageInfo)); + memset_s(&info_, sizeof(ImageInfo), 0, sizeof(ImageInfo)); if ((img != nullptr) && (container != nullptr)) { container->Add(img); img->SetVisible(false);