Skip to content

Commit

Permalink
pulse: fix pa_proplist_set[fs] usage
Browse files Browse the repository at this point in the history
pa_proplist_setf should be used only with an actual format string,
otherwise pa_proplist_sets should be used. If the value doesn't contain
any %-sequence, the result is the same, but gcc -Werror=format-security
complains about format string being non-literal. This is the case for
Ubuntu bionic build.

Change it to pa_proplist_sets.

Fixes QubesOS/qubes-issues#5766

(cherry picked from commit b9ccb2f)
  • Loading branch information
marmarek committed Apr 18, 2020
1 parent 22e6859 commit a4182f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pulse/module-vchan-sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ int pa__init(pa_module * m)
DEFAULT_SINK_NAME));
pa_proplist_sets(data_sink.proplist,
PA_PROP_DEVICE_STRING, DEFAULT_SINK_NAME);
pa_proplist_setf(data_sink.proplist,
pa_proplist_sets(data_sink.proplist,
PA_PROP_DEVICE_DESCRIPTION,
pa_modargs_get_value(ma,
"sink_desc",
Expand Down Expand Up @@ -755,7 +755,7 @@ int pa__init(pa_module * m)
data_source.module = m;
pa_source_new_data_set_name(&data_source, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME));
pa_proplist_sets(data_source.proplist, PA_PROP_DEVICE_STRING, DEFAULT_SOURCE_NAME);
pa_proplist_setf(data_source.proplist, PA_PROP_DEVICE_DESCRIPTION,
pa_proplist_sets(data_source.proplist, PA_PROP_DEVICE_DESCRIPTION,
pa_modargs_get_value(ma, "source_desc", DEFAULT_SOURCE_DESC));
pa_source_new_data_set_sample_spec(&data_source, &ss);
pa_source_new_data_set_channel_map(&data_source, &map);
Expand Down

0 comments on commit a4182f5

Please sign in to comment.