mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 22:40:18 +00:00
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:
@@ -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 ");
|
||||
|
||||
Reference in New Issue
Block a user