summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-05-10 01:25:39 -0400
committerJeffrey Walton <noloader@gmail.com>2020-05-10 01:25:39 -0400
commit680956e13436e29ebcd85dee776260fd3de89846 (patch)
tree2d5632b113c4d3f181c645447090b5eddb5a0776 /misc.h
parent7a8e241c7c0e75329793f36681894f8dab41fb37 (diff)
downloadcryptopp-git-680956e13436e29ebcd85dee776260fd3de89846.tar.gz
Clean GCC 10 Analyzer warnings
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 695d75c0..c82a860c 100644
--- a/misc.h
+++ b/misc.h
@@ -524,7 +524,8 @@ inline void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t cou
# pragma warning(disable: 6386)
# endif
#endif
- memcpy(dest, src, count);
+ if (src && dest)
+ memcpy(dest, src, count);
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif