Skip to content

Commit

Permalink
[BugFix] fix BE crash when http api request for pprof/cmdline (backport
Browse files Browse the repository at this point in the history
#51077) (#51131)

Co-authored-by: Rohit Satardekar <[email protected]>
  • Loading branch information
mergify[bot] and rohitrs1983 authored Sep 19, 2024
1 parent 38e2009 commit 80ef3ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/http/action/pprof_actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 80ef3ea

Please sign in to comment.