Article View: de.test
Article #55Re: Nein, nein, nein!
From: Urs Janßen
Date: Thu, 22 Oct 2026 15:50
Date: Thu, 22 Oct 2026 15:50
31 lines
2741 bytes
2741 bytes
Dennis Preiser wrote:
> Ist nicht garantiert.
und das sagt einem z.b. gcc auch wenn man ihn fragt:
urs% printf 'main() { int x; return x ; }' | gcc -Wno-implicit-int -fanalyzer -xc - -o x ;
<stdin>: In function ‘main’:
<stdin>:1:24: warning: use of uninitialized value ‘x’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
‘main’: events 1-3
<stdin>:1:14: (1): region created on stack here
<stdin>:1:14: (2): capacity: 4 bytes
<stdin>:1:24: (3): use of uninitialized value ‘x’ here
<https://cwe.mitre.org/data/definitions/457.html>
[...]
| In some languages such as C and C++, stack variables are not initialized by
| default. They generally contain junk data with the contents of stack memory
| before the function was invoked. An attacker can sometimes control or read
| these contents. In other languages or conditions, a variable that is not
| explicitly initialized can be given a default value that has security
| implications, depending on the logic of the program. The presence of an
| uninitialized variable can sometimes indicate a typographic error in the
| code.
[...]
oder
urs% printf 'int main() { int x; return x ; }' | gcc -W -xc - -o x ;
<stdin>: In function ‘main’:
<stdin>:1:24: warning: ‘x’ is used uninitialized [-Wuninitialized]
<stdin>:1:14: note: ‘x’ was declared here
Technical Details
Message-ID:
<11bdbc6$on4$1@nntp.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mailReferences:
<87jync36yh.fsf@dear-messner.dont-email.me> <20261020tu194524@o15.ybtra.de> <87ld7r21ff.fsf@yeti.tilde.institute> <87zew7xjl7.fsf@dear-messner.dont-email.me> <20261021we204605@o15.ybtra.de> <20261021we205243@o15.ybtra.de> <20261021we205645@o15.ybtra.de> <87h5iexs2b.fsf@dear-messner.dont-email.me> <AABq2b8JL4cAACMG.A3.flnews@o15.ybtra.de> <87a4o6xi1h.fsf@dear-messner.dont-email.me> <20261022th104811@o15.ybtra.de> <0TmcfpaeI207Nfm%dennis@coredump.d--p.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mail
From: Urs Janßen <urs@akk.org>
Newsgroups: de.test
Subject: Re: Nein, nein, nein!
Date: Thu, 22 Oct 2026 15:50:30 -0000 (UTC)
Organization: $FCE2
Message-ID: <11bdbc6$on4$1@nntp.de>
References: <87jync36yh.fsf@dear-messner.dont-email.me> <20261020tu194524@o15.ybtra.de> <87ld7r21ff.fsf@yeti.tilde.institute> <87zew7xjl7.fsf@dear-messner.dont-email.me> <20261021we204605@o15.ybtra.de> <20261021we205243@o15.ybtra.de> <20261021we205645@o15.ybtra.de> <87h5iexs2b.fsf@dear-messner.dont-email.me> <AABq2b8JL4cAACMG.A3.flnews@o15.ybtra.de> <87a4o6xi1h.fsf@dear-messner.dont-email.me> <20261022th104811@o15.ybtra.de> <0TmcfpaeI207Nfm%dennis@coredump.d--p.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Oct 2026 15:50:30 -0000 (UTC)
Injection-Info: nntp.de; posting-host="akk21-int.akk.kit.edu:2a00:1398:5:f602:cafe:cafe:cafe:21";
logging-data="25316"; mail-complaints-to="abuse@nntp.de"
Keywords: ignore, no reply
User-Agent: tin/2.6.7-20261019 ("Glenlochy") (Linux/6.12.111+deb13-amd64 (x86_64))
Cancel-Lock: sha1:yKYQ/zxK3pqLHGSZRpWNASA40Jg=