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;