KEMBAR78
Increase setup_lib_path buf size to PATH_MAX by krk · Pull Request #1049 · async-profiler/async-profiler · GitHub
Skip to content

Conversation

krk
Copy link
Contributor

@krk krk commented Nov 8, 2024

Description

Buffer smaller than PATH_MAX would cause silent truncation when path length is larger than the buffer size.

Motivation and context

To eliminate possible silent filename truncation, which may cause an error or surprising behavior.

How has this been tested?

make test
asprof start and check libpath value.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

#include "fdtransferServer.h"

#ifdef __linux__
#include <linux/limits.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a platform independent version: <limits.h>

@apangin apangin merged commit e6a319e into async-profiler:master Nov 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants