This won't fix the reported issue but it is an incorrect use of sizeof.
ASTERISK-24566
Reported by: Badalian Vyacheslav
........
Merged revisions 429867 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 429868 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429870
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
{
size_t header_size = 2; /* The minimum size of a websocket frame is 2 bytes */
char *frame;
- uint64_t length = 0;
+ uint64_t length;
if (actual_length < 126) {
length = actual_length;
}
frame = ast_alloca(header_size);
- memset(frame, 0, sizeof(*frame));
+ memset(frame, 0, header_size);
frame[0] = opcode | 0x80;
frame[1] = length;