#include <assert.h>
#include <common/mi-lttng.h>
+#include <lttng/constant.h>
#include "../command.h"
int ret;
FILE *fp = NULL;
char *cmdline = NULL;
- char path[20]; /* Can't go bigger than /proc/65535/cmdline */
+ /* Can't go bigger than /proc/LTTNG_MAX_PID/cmdline */
+ char path[sizeof("/proc//cmdline") + sizeof(LTTNG_MAX_PID_STR) - 1];
snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);
fp = fopen(path, "r");