diff options
author | Adam Jackson <ajax@redhat.com> | 2008-07-02 14:24:24 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-07-02 14:24:24 -0400 |
commit | e3166eecfe7a04f0f622bd93e8a6a1faa672a029 (patch) | |
tree | edfca620109baed240704190a12ee93bec246caa /src/SMlibint.h | |
parent | 27ebe517cabaf038fa65edff0140317f9438adec (diff) |
Avoid memcpy(foo, NULL, n), that's just nonsense.
Diffstat (limited to 'src/SMlibint.h')
-rw-r--r-- | src/SMlibint.h | 3 |
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); \ |