From c3a71742e5092b012921ad80d3375b231a75f8c2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 2 Jun 2015 18:07:20 +0200 Subject: -fsanitize=nonnull-attribute in memcpy call Change-Id: If1f852ce4ef3419d663d4e2f4bdb4a57cc61e799 --- sal/rtl/byteseq.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sal') diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index a3744863bd8d..024719adaff0 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -192,7 +192,7 @@ void SAL_CALL rtl_byte_sequence_constructFromArray( SAL_THROW_EXTERN_C() { rtl_byte_sequence_constructNoDefault( ppSequence , nLength ); - if ( *ppSequence != 0 ) + if ( *ppSequence != 0 && nLength != 0 ) memcpy( (*ppSequence)->elements, pData, nLength ); } -- cgit