process_pipeline: replace sprintf with snprintf
to avoid potential buffer overflows
This commit is contained in:

committed by
Martijn Braam

parent
f64782d9a5
commit
529e7841ab
@@ -1413,9 +1413,10 @@ activate(GtkApplication *app, gpointer data)
|
||||
// Initialize the postprocessing gsetting to the old processor if
|
||||
// it was not set yet
|
||||
if (setting_postproc == NULL || setting_postproc[0] == '\0') {
|
||||
const int size = 512;
|
||||
printf("Initializing postprocessor gsetting\n");
|
||||
setting_postproc = malloc(512);
|
||||
if (!mp_process_find_processor(setting_postproc, "postprocess.sh")) {
|
||||
setting_postproc = malloc(size);
|
||||
if (!mp_process_find_processor(setting_postproc, size, "postprocess.sh")) {
|
||||
printf("No processor found\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user