[Asterisk-code-review] vector: Prevent NULL argument to memcpy. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Sun Oct 30 18:03:40 CDT 2016
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/4236 )
Change subject: vector: Prevent NULL argument to memcpy.
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.asterisk.org/#/c/4236/1/include/asterisk/vector.h
File include/asterisk/vector.h:
Line 173: new_max * sizeof(*new_elems)); \
> This is some kind of magic? We can get the size of an item that has not yet
No magic, this is pretty standard. sizeof is fully evaluated at compile time using type information, it's not based on allocated size.
--
To view, visit https://gerrit.asterisk.org/4236
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I988a476bb5fcfcbd3f6d6c6b3e7769e4f9629b71
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Badalian Vyacheslav <v.badalyan at open-bs.ru>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list