Pipewireパッケージ(ちょっと変更)
Revisión | b3f8df6dfc8e5ed97a6d4df4166b75e108f0545d (tree) |
---|---|
Tiempo | 2023-10-11 20:34:18 |
Autor | Wim Taymans <wtaymans@redh...> |
Commiter | Wim Taymans |
pw-cat: don't overrun our param array
@@ -1977,7 +1977,8 @@ int main(int argc, char *argv[]) | ||
1977 | 1977 | uint32_t i, n_items = 0; |
1978 | 1978 | |
1979 | 1979 | for (i = 0; i < data.props->dict.n_items; i++) { |
1980 | - if (spa_strstartswith(data.props->dict.items[i].key, "media.")) | |
1980 | + if (n_items < SPA_N_ELEMENTS(items) && | |
1981 | + spa_strstartswith(data.props->dict.items[i].key, "media.")) | |
1981 | 1982 | items[n_items++] = data.props->dict.items[i]; |
1982 | 1983 | } |
1983 | 1984 | if (n_items > 0) { |