From 61c0cee1a519d72ac947045beb75f286595ecf00 Mon Sep 17 00:00:00 2001 From: luoliangyi <87842688@@qq.com> Date: Mon, 21 Oct 2024 17:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/base/HGDll.cpp | 2 +- modules/sane_user/HGSaneImpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/base/HGDll.cpp b/modules/base/HGDll.cpp index a0c36094..3f44deb1 100644 --- a/modules/base/HGDll.cpp +++ b/modules/base/HGDll.cpp @@ -37,7 +37,7 @@ struct HGDllImpl HGResult HGAPI HGBase_CreateDll(const HGChar* fileName, HGDll* dll) { - if (NULL == fileName || NULL == dll) + if (NULL == fileName || 0 == *fileName || NULL == dll) { return HGBASE_ERR_INVALIDARG; } diff --git a/modules/sane_user/HGSaneImpl.cpp b/modules/sane_user/HGSaneImpl.cpp index 714ffd94..e32c9fb7 100644 --- a/modules/sane_user/HGSaneImpl.cpp +++ b/modules/sane_user/HGSaneImpl.cpp @@ -364,7 +364,7 @@ HGResult HGSaneSourceImpl::Open(const HGChar* saneManu, const HGChar* sanePath) return HGBASE_ERR_INVALIDARG; } - HGChar fileName[260]; + HGChar fileName[260] = {0}; HGBase_GetFileName(sanePath, fileName, 260); HGDll dll = NULL;