diff --git a/src/plugins/intel_npu/src/plugin/src/metadata.cpp b/src/plugins/intel_npu/src/plugin/src/metadata.cpp index ce60641f415b0d..345557e656b3f0 100644 --- a/src/plugins/intel_npu/src/plugin/src/metadata.cpp +++ b/src/plugins/intel_npu/src/plugin/src/metadata.cpp @@ -22,7 +22,7 @@ std::streampos getFileSize(std::istream& stream) { } if (dynamic_cast(stream.rdbuf()) != nullptr) { - return stream.rdbuf()->in_avail() + stream.tellg(); + return stream.rdbuf()->in_avail(); } const std::streampos streamStart = stream.tellg(); @@ -123,7 +123,7 @@ std::unique_ptr read_metadata_from(std::istream& stream) { blobMagicBytes.resize(magicBytesSize); std::streampos currentStreamPos = stream.tellg(), streamSize = getFileSize(stream); - stream.seekg(-currentStreamPos + streamSize - magicBytesSize, std::ios::cur); + stream.seekg(streamSize - std::streampos(magicBytesSize), std::ios::cur); stream.read(blobMagicBytes.data(), magicBytesSize); if (MAGIC_BYTES != blobMagicBytes) { OPENVINO_THROW("Blob is missing NPU metadata!");