Fix: Properly sanitize input parameter
[lttng-tools.git] / src / bin / lttng / commands / enable_channels.c
index 9c84d02634c8612740b914c4a1c6d0d5e806b210..856fea46faf2c8f1a779bf248e86c643e3607087 100644 (file)
@@ -244,7 +244,7 @@ static int enable_channel(char *session_name)
                void *extended_ptr;
 
                /* Validate channel name's length */
-               if (strlen(channel_name) >= NAME_MAX) {
+               if (strlen(channel_name) >= sizeof(chan_opts.name)) {
                        ERR("Channel name is too long (max. %zu characters)",
                                        sizeof(chan_opts.name) - 1);
                        error = 1;
This page took 0.02298 seconds and 4 git commands to generate.