From d33a0157494fdb80ef07f59ea36c1a1b4635b2cc Mon Sep 17 00:00:00 2001 From: Minsoo Cheong Date: Fri, 22 Mar 2024 14:47:37 +0900 Subject: [PATCH] remove use of variable sized array --- examples/retrieval/retrieval.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/retrieval/retrieval.cpp b/examples/retrieval/retrieval.cpp index dec06752f..817d98f5c 100644 --- a/examples/retrieval/retrieval.cpp +++ b/examples/retrieval/retrieval.cpp @@ -31,10 +31,10 @@ static std::vector chunk_file(const std::string filename, int chunk_size, } chunk current_chunk; - char buffer[chunk_size]; + char buffer[100]; int64_t filepos = 0; std::string current = ""; - while (f.read(buffer, chunk_size)) { + while (f.read(buffer, 100)) { current += std::string(buffer, f.gcount()); size_t pos; while ((pos = current.find(chunk_separator)) != std::string::npos) {