lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 6 Jan 2024 22:22:14 +0100
From: Mirsad Todorovac <mirsad.todorovac@....unizg.hr>
To: linux-kernel@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>, Shuah Khan <shuah@...nel.org>,
 linux-sound@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: [BUG] selftests: alsa: conf.c: wrong parm passed to printf [FIXED]

Hi, all,

There is a minor omission in selftests/alsa/conf.c, returning errno where there is
strerror(errno) passed in the sibling calls to printf().

The bug was apparently introduced with the commit aba51cd0949ae
("selftests: alsa - add PCM test").

As a diff speaks like a thousand words, the fix is simple:

Regards,
Mirsad

----- cut -----
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c
index 00925eb8d9f4..89e3656a042d 100644
--- a/tools/testing/selftests/alsa/conf.c
+++ b/tools/testing/selftests/alsa/conf.c
@@ -179,7 +179,7 @@ static char *sysfs_get(const char *sysfs_root, const char *id)
        close(fd);
        if (len < 0)
                ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n",
-                                  path, errno);
+                                  path, strerror(errno));
        while (len > 0 && path[len-1] == '\n')
                len--;
        path[len] = '\0';


-- 
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union

"I see something approaching fast ... Will it be friends with me?"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ