Trivial compilation warning fix

src/control_socket.cpp: In function ‘void* control_thread(void*)’:
src/control_socket.cpp:574:44: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1009 [-Wformat-truncation=]
                 snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
                                            ^~~~~~~~~~~~~~~~~~~~  ~~~~
src/control_socket.cpp:574:25: note: ‘snprintf’ output between 17 and 1040 bytes into a destination of size 1024
                 snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
This commit is contained in:
Milos Liska
2018-10-17 19:32:42 +02:00
parent 9fa27c6223
commit 19938cfb79

View File

@@ -289,7 +289,7 @@ static int process_msg(struct control_state *s, fd_t client_fd, char *message, s
char path[1024] = ""; // path for msg receiver (usually video)
char path_audio[1024] = ""; // auxiliary buffer used when we need to signalize both audio
// and video
char buf[1024];
char buf[1048];
if(prefix_matches(message, "port ")) {
message = suffix(message, "port ");