We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e15007e commit 2f96369Copy full SHA for 2f96369
1 file changed
av/filter/loudnorm_impl.c
@@ -36,7 +36,9 @@ static void logging_callback(void *ptr, int level, const char *fmt, va_list vl)
36
pthread_mutex_lock(&json_mutex);
37
#endif
38
39
- strncpy(json_buffer, json_start, sizeof(json_buffer) - 1);
+ size_t len = strnlen(json_start, sizeof(json_buffer) - 1);
40
+ memcpy(json_buffer, json_start, len);
41
+ json_buffer[len] = '\0';
42
json_captured = 1;
43
44
#ifdef _WIN32
0 commit comments