1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Added variable check before dereference

This commit is contained in:
Bryan Roe
2022-08-19 11:42:47 -07:00
parent cd60e2bdf9
commit cf0bf3cd59

View File

@@ -4849,7 +4849,7 @@ void ILibDuktape_httpStream_webSocketStream_descriptorMetadataEx(duk_context *ct
ILibDuktape_WebSocket_State *ws = (ILibDuktape_WebSocket_State*)args[0];
char *str = (char*)args[1];
if(ws->encodedStream->writableStream->pipedReadable != NULL)
if(ILibMemory_CanaryOK(ws) && ws->encodedStream->writableStream->pipedReadable != NULL)
{
duk_idx_t top = duk_get_top(ctx);
duk_push_heapptr(ctx, ws->encodedStream->writableStream->pipedReadable); // [WebSocket_Decoded][WebSocket][Readable]