From 93fb9942980c17d6772fc4130988eafbe594f710 Mon Sep 17 00:00:00 2001 From: Rohit Satardekar Date: Wed, 18 Sep 2024 01:47:23 +0530 Subject: [PATCH] [BugFix] fix BE crash when http api request for pprof/cmdline Signed-off-by: Rohit Satardekar --- be/src/http/action/pprof_actions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/http/action/pprof_actions.cpp b/be/src/http/action/pprof_actions.cpp index 07e65a6ae391b..c7eab3a112d3c 100644 --- a/be/src/http/action/pprof_actions.cpp +++ b/be/src/http/action/pprof_actions.cpp @@ -162,7 +162,7 @@ void CmdlineAction::handle(HttpRequest* req) { return; } char buf[1024]; - if (fscanf(fp, "%s ", buf) != 1) { + if (fscanf(fp, "%1023s ", buf) != 1) { strcpy(buf, "read cmdline failed"); } fclose(fp);