alsa/0062-ucm-remove-MAX_FILE-definition-and-use-correct-PATH_.patch
Takashi Iwai 6ab9f38ea9 Accepting request 766329 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes:
  more topology fixes, a memory leak fix in mixer API, alsactl
  string handling fix, UCM config fixes:
  0032-Update-the-attributes.m4-macro-file-from-xine.patch
  0033-topology-avoid-to-use-the-atoi-directly-when-expecte.patch
  0034-topology-use-snd_config_get_bool-instead-own-impleme.patch
  0035-topology-fix-tplg_get_integer-handle-errno-ERANGE.patch
  0036-topology-add-tplg_get_unsigned-function.patch
  0037-topology-convert-builder-to-use-the-mallocated-memor.patch
  0038-topology-add-binary-output-from-the-builder.patch
  0039-topology-parser-recode-tplg_parse_config.patch
  0040-topology-add-snd_tplg_load-remove-snd_tplg_build_bin.patch
  0041-topology-move-the-topology-element-table-from-builde.patch
  0042-topology-add-parser-to-the-tplg_table.patch
  0043-topology-add-snd_tplg_save.patch
  0044-topology-add-snd_tplg_create-with-flags.patch
  0045-topology-add-snd_tplg_version-function.patch
  0046-topology-cleanup-the-SNDERR-calls.patch
  0047-topology-dapm-fix-the-SNDERR-Undefined.patch
  0048-topology-fix-the-unitialized-tuples.patch
  0049-topology-implement-shorter-hexa-uuid-00-00-parser.patch
  0050-topology-fix-the-TPLG_DEBUG-compilation.patch
  0051-topology-fix-the-ops-parser-accept-integer-hexa-valu.patch
  0052-topology-fix-the-wrong-memory-access-object-realloc.patch
  0053-topology-implement-snd_tplg_decode.patch
  0054-topology-move-the-elem-list-delete-to-tplg_elem_free.patch
  0055-topology-unify-the-log-mechanism.patch
  0056-topology-tplg_dbg-cleanups.patch
  0057-topology-cosmetic-changes-functions.patch
  0058-mixer-Fix-memory-leak-for-more-than-16-file-descript.patch

OBS-URL: https://build.opensuse.org/request/show/766329
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=265
2020-01-22 14:27:43 +00:00

59 lines
1.7 KiB
Diff

From ebf5213cd61824b10bcaf67c570919e2a9ea0e1f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 15 Jan 2020 10:40:01 +0100
Subject: [PATCH 62/63] ucm: remove MAX_FILE definition and use correct
PATH_MAX
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/parser.c | 6 +++---
src/ucm/ucm_local.h | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index 1bfde0be327d..6c13fafdabbf 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -1167,7 +1167,7 @@ static int parse_verb_file(snd_use_case_mgr_t *uc_mgr,
snd_config_t *n;
struct use_case_verb *verb;
snd_config_t *cfg;
- char filename[MAX_FILE];
+ char filename[PATH_MAX];
int err;
/* allocate verb */
@@ -1582,7 +1582,7 @@ static int get_by_card(snd_use_case_mgr_t *mgr, const char *ctl_name, char *long
static int load_master_config(snd_use_case_mgr_t *uc_mgr,
const char *card_name, snd_config_t **cfg, int longname)
{
- char filename[MAX_FILE];
+ char filename[PATH_MAX];
int err;
if (strnlen(card_name, MAX_CARD_LONG_NAME) == MAX_CARD_LONG_NAME) {
@@ -1733,7 +1733,7 @@ static int is_component_directory(const char *dir)
*/
int uc_mgr_scan_master_configs(const char **_list[])
{
- char filename[MAX_FILE], dfl[MAX_FILE];
+ char filename[PATH_MAX], dfl[PATH_MAX];
char *env = getenv(ALSA_CONFIG_UCM2_VAR);
const char **list, *d_name;
snd_config_t *cfg, *c;
diff --git a/src/ucm/ucm_local.h b/src/ucm/ucm_local.h
index 63e0f3bf1697..fa9fc16661bb 100644
--- a/src/ucm/ucm_local.h
+++ b/src/ucm/ucm_local.h
@@ -42,7 +42,6 @@
#define SYNTAX_VERSION_MAX 2
-#define MAX_FILE 256
#define MAX_CARD_SHORT_NAME 32
#define MAX_CARD_LONG_NAME 80
--
2.16.4