mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-05 14:30:00 +01:00
fftools/cmdutils: use strcpy directly, the length is computed already
There is no need to scan for NULL, if we inject it ourselves. Fixes: warning: 'strncat' specified bound 10 equals source length [-Wstringop-overflow=] Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@@ -962,8 +962,7 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
|||||||
datadir, desired_size, sizeof *datadir);
|
datadir, desired_size, sizeof *datadir);
|
||||||
if (new_datadir) {
|
if (new_datadir) {
|
||||||
datadir = new_datadir;
|
datadir = new_datadir;
|
||||||
datadir[datadir_len] = 0;
|
strcpy(datadir + datadir_len, "/ffpresets");
|
||||||
strncat(datadir, "/ffpresets", desired_size - 1 - datadir_len);
|
|
||||||
base[2] = datadir;
|
base[2] = datadir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user