From e3166eecfe7a04f0f622bd93e8a6a1faa672a029 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 2 Jul 2008 14:24:24 -0400 Subject: Avoid memcpy(foo, NULL, n), that's just nonsense. --- src/SMlibint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); \ -- cgit v1.2.3