diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-23 17:15:15 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-23 17:15:15 +0200 |
| commit | a4c85077526fc1f240e6d02ddc13a988eca27b83 (patch) | |
| tree | 87682e80d06cd10c627a6bf64bbb512c7f2904f6 | |
| parent | b1ae6e39d31408e5f1eae77fe1de1ac292f54182 (diff) | |
Fix potentially unterminated string (#1844).
| -rw-r--r-- | src/lib/transcode_job.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index c13f69d70..3fbd91841 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -125,7 +125,7 @@ TranscodeJob::status () const char buffer[256]; if (finished() || _encoder->finishing()) { - strncpy (buffer, Job::status().c_str(), 256); + strncpy (buffer, Job::status().c_str(), sizeof(buffer) - 1); } else { snprintf ( buffer, sizeof(buffer), "%s; %" PRId64 "/%" PRId64 " frames", |
