Also added a warning if the length is exceeded
{
int kfd;
char buf[PATH_MAX];
- char new_name[128];
+ char new_name[256];
struct perf_reader *reader = NULL;
static char *event_type = "uprobe";
int ns_fd = -1;
n = snprintf(buf, sizeof(buf), "%c:%ss/%s %s:0x%lx", attach_type==BPF_PROBE_ENTRY ? 'p' : 'r',
event_type, new_name, binary_path, offset);
if (n >= sizeof(buf)) {
+ fprintf(stderr, "Name too long for uprobe; ev_name (%s) is probably too long\n", ev_name);
close(kfd);
goto error;
}