From 39b30d8ca8eb8da8ec23b91f6b40654f17990b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Fri, 20 Dec 2024 01:48:45 +0000 Subject: [PATCH] fix: read out of bound in win64 platform --- src/jobs.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jobs.hpp b/src/jobs.hpp index b881589..2c23728 100644 --- a/src/jobs.hpp +++ b/src/jobs.hpp @@ -33,7 +33,7 @@ class KggTask { std::ifstream kgg_stream_in(kgg_path_, std::ios::binary); char header[0x100]{}; - kgg_stream_in.read(header, sizeof(kgg_stream_in)); + kgg_stream_in.read(header, sizeof(header)); if (std::equal(kMagicHeader.cbegin(), kMagicHeader.cend(), header)) { warning(L"invalid kgg header"); return;