[asterisk-commits] rmudgett: branch 13 r429868 - in /branches/13: ./ res/res_http_websocket.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 19 14:54:25 CST 2014
Author: rmudgett
Date: Fri Dec 19 14:54:23 2014
New Revision: 429868
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429868
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
........
Merged revisions 429867 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/13/ (props changed)
branches/13/res/res_http_websocket.c
Propchange: branches/13/
------------------------------------------------------------------------------
--- branch-11-merged (original)
+++ branch-11-merged Fri Dec 19 14:54:23 2014
@@ -1,1 +1,1 @@
-/branches/11:1-429517,429539,429632,429783,429804,429825
+/branches/11:1-429517,429539,429632,429783,429804,429825,429867
Modified: branches/13/res/res_http_websocket.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_http_websocket.c?view=diff&rev=429868&r1=429867&r2=429868
==============================================================================
--- branches/13/res/res_http_websocket.c (original)
+++ branches/13/res/res_http_websocket.c Fri Dec 19 14:54:23 2014
@@ -273,7 +273,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;
@@ -288,7 +288,7 @@
}
frame = ast_alloca(header_size);
- memset(frame, 0, sizeof(*frame));
+ memset(frame, 0, header_size);
frame[0] = opcode | 0x80;
frame[1] = length;
More information about the asterisk-commits
mailing list