From 04499d1c7dab8048bd1a37e322f29c9b94723f2b Mon Sep 17 00:00:00 2001 From: cebtenzzre Date: Wed, 11 Oct 2023 11:31:34 -0400 Subject: [PATCH] chatllm: do not write uninitialized data to stream (#1486) --- gpt4all-chat/chatllm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index 6528f41c..3f26f483 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -779,7 +779,7 @@ bool ChatLLM::serialize(QDataStream &stream, int version, bool serializeKV) } if (version <= 3) { - int responseLogits; + int responseLogits = 0; stream << responseLogits; } stream << m_ctx.n_past;