avoid future chance of using uninitialized memory
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 19 Dec 2014 22:53:36 +0000 (17:53 -0500)
committerWerner Koch <wk@gnupg.org>
Mon, 22 Dec 2014 12:14:17 +0000 (13:14 +0100)
commit367b073ab5f439ccf0750461d10c69f36998bd62
tree4f852b1306ed2e07528e026a03b1f85fcc8e2073
parent628b111fa679612e23c0d46505b1ecbbf091897d
avoid future chance of using uninitialized memory

* common/iobuf.c: (iobuf_open): initialize len

--

In iobuf_open, IOBUFCTRL_DESC and IOBUFCTRL_INIT commands are invoked
(via file_filter()) on fcx, passing in a pointer to an uninitialized
len.

With these two commands, file_filter doesn't actually do anything with
the value of len, so there's no actual risk of use of uninitialized
memory in the code as it stands.

However, some static analysis tools might flag this situation with a
warning, and initializing the value doesn't hurt anything, so i think
this trivial cleanup is warranted.

Debian-Bug-Id: 773469
common/iobuf.c