Author: rmudgett
Date: Fri Dec 19 14:51:41 2014
New Revision: 429867
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429867
Log:
res_http_websocket.c: Fix incorrect use of sizeof in ast_websocket_write().
This won't fix the reported issue but it is an incorrect use of sizeof.
ASTERISK-24566
Reported by: Badalian Vyacheslav
Modified:
branches/11/res/res_http_websocket.c
Modified: branches/11/res/res_http_websocket.c
URL:
http://svnview.digium.com/svn/asterisk/branches/11/res/res_http_websocket.c?view=diff&rev=429867&r1=429866&r2=429867
==============================================================================
--- branches/11/res/res_http_websocket.c (original)
+++ branches/11/res/res_http_websocket.c Fri Dec 19 14:51:41 2014
@@ -220,7 +220,7 @@
{
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;
@@ -235,7 +235,7 @@
}
frame = ast_alloca(header_size);
- memset(frame, 0, sizeof(*frame));
+ memset(frame, 0, header_size);
frame[0] = opcode | 0x80;
frame[1] = length;
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
svn-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/svn-commits