[PATCH] hadaudio: fix the the build errors under plucky amd64
Ivan Hu
ivan.hu at canonical.com
Thu Nov 21 05:32:00 UTC 2024
BugLink: https://bugs.launchpad.net/fwts/+bug/2089205
The path has already been with PATH_MAX, so the name and fullpath
with the same size PATH_MAX which make compiler format-truncation
error. Simply double the size to fix the compiler errors.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
src/bios/hdaaudio/hdaaudio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bios/hdaaudio/hdaaudio.c b/src/bios/hdaaudio/hdaaudio.c
index 56936c40..83c96faa 100644
--- a/src/bios/hdaaudio/hdaaudio.c
+++ b/src/bios/hdaaudio/hdaaudio.c
@@ -33,7 +33,7 @@ static int hda_audio_read_pins(const char *path, const char *file, fwts_list *se
FILE *fp;
uint16_t pin;
uint32_t setting;
- char name[PATH_MAX];
+ char name[PATH_MAX*2];
fwts_list_init(settings);
@@ -84,7 +84,7 @@ static void hda_audio_dev_info(fwts_framework *fw, const char *label,
const char *path, const char *file)
{
char *info;
- char fullpath[PATH_MAX];
+ char fullpath[PATH_MAX*2];
snprintf(fullpath, sizeof(fullpath), "%s/%s", path, file);
--
2.34.1
More information about the fwts-devel
mailing list