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>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <VI1PR02MB39525F61113D96E3671BFA1F9C1AA@VI1PR02MB3952.eurprd02.prod.outlook.com>
Date: Tue, 30 Sep 2025 10:19:19 +0000
From: David Binderman <dcb314@...mail.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim
	<namhyung@...nel.org>, "mark.rutland@....com" <mark.rutland@....com>,
	"alexander.shishkin@...ux.intel.com" <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>, Adrian Hunter
	<adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>,
	"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>, LKML
	<linux-kernel@...r.kernel.org>
Subject: inux-6.17/tools/perf/util/lzma.c:123: Strange return value ?

Hello there,

Static analyser cppcheck says:

linux-6.17/tools/perf/util/lzma.c:123:3: style: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]

Source code is

bool lzma_is_compressed(const char *input)
{
    int fd = open(input, O_RDONLY);
    const uint8_t magic[6] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 };
    char buf[6] = { 0 };
    ssize_t rc;

    if (fd < 0)
        return -1;

Suggest return either true or false.

Also, there is a duplicate of this problem at file linux-6.17/tools/perf/util/zlib.c
line 91.

Regards

David Binderman



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ