summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-07-02 14:24:24 -0400
committerAdam Jackson <ajax@redhat.com>2008-07-02 14:24:24 -0400
commite3166eecfe7a04f0f622bd93e8a6a1faa672a029 (patch)
treeedfca620109baed240704190a12ee93bec246caa
parent27ebe517cabaf038fa65edff0140317f9438adec (diff)
Avoid memcpy(foo, NULL, n), that's just nonsense.
-rw-r--r--src/SMlibint.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SMlibint.h b/src/SMlibint.h
index dce55b2..0569c3f 100644
--- a/src/SMlibint.h
+++ b/src/SMlibint.h
@@ -207,7 +207,8 @@ in this Software without prior written authorization from The Open Group.
#define STORE_ARRAY8(_pBuf, _len, _array8) \
{ \
STORE_CARD32 (_pBuf, _len); \
- memcpy (_pBuf, _array8, _len); \
+ if (_array8) \
+ memcpy (_pBuf, _array8, _len); \
_pBuf += _len; \
if (PAD64 (4 + _len)) \
_pBuf += PAD64 (4 + _len); \