Skip to content

Commit

Permalink
Fix gcc 14.2.1 warning on memcpy
Browse files Browse the repository at this point in the history
As seen on #277
  • Loading branch information
babelouest committed Sep 10, 2024
1 parent 3fd9d8d commit 330a53a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/u_websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <string.h>
#include <unistd.h>
#include <zlib.h>
#include <limits.h>

#include "yuarel.h"

Expand Down Expand Up @@ -2062,7 +2063,7 @@ int websocket_extension_message_in_inflate(const uint8_t opcode,
(void)fragment_len;
(void)user_data;

if (data_len_in && data_len_in <= (SIZE_MAX-4)) {
if (data_len_in && data_len_in <= (SSIZE_MAX-4)) {
if (deflate_context != NULL) {
*data_out = NULL;
*data_len_out = 0;
Expand Down

0 comments on commit 330a53a

Please sign in to comment.