avoid future chance of using uninitialized memory
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 19 Dec 2014 22:53:36 +0000 (17:53 -0500)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 13 Jan 2015 02:06:43 +0000 (11:06 +0900)
commite7cbce8fb2b7417fd1048f916b3e3281f5b9dd7b
tree67067a45c26f4b59078c063eebfd300b3bf8164c
parente2e822d22526c1545e095bc24173b732137f5737
avoid future chance of using uninitialized memory

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

--

Cherry-pick 367b073ab5f439ccf0750461d10c69f36998bd62.

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
util/iobuf.c