vector: Prevent NULL argument to memcpy.
authorCorey Farrell <git@cfware.com>
Sun, 30 Oct 2016 18:33:12 +0000 (14:33 -0400)
committerCorey Farrell <git@cfware.com>
Sun, 30 Oct 2016 18:46:19 +0000 (13:46 -0500)
commit273debd261148dcc0962566d83ee9c601ee5c99c
tree7a6c7bb6f78cbf66c5d86c106030c08e05a64232
parent12bdde6a6cab0c88845c100764105ca8e44baa43
vector: Prevent NULL argument to memcpy.

Headers declare that memcpy does not accept NULL argument for the first
two parameters.  Add a conditional block to prevent memcpy and ast_free
from running on vectors with NULL element array.

ASTERISK-26526 #close

Change-Id: I988a476bb5fcfcbd3f6d6c6b3e7769e4f9629b71
include/asterisk/vector.h