diff options
author | Justus Winter <[email protected]> | 2015-11-19 15:13:55 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2015-11-19 15:13:55 +0000 |
commit | eb957ffc4797fb019c505510295af244baf5be38 (patch) | |
tree | f8ff62f0c74d6c3e62442938328e81c6b71f5b42 | |
parent | g10: Avoid undefined behavior. (diff) | |
download | gnupg-eb957ffc4797fb019c505510295af244baf5be38.tar.gz gnupg-eb957ffc4797fb019c505510295af244baf5be38.zip |
common: Avoid undefined behavior.
* common/iobuf.c (iobuf_esopen): Initialize 'len' as 'file_es_filter'
will make use of it.
--
Found using the Clang Static Analyzer.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/iobuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index 12affcb4b..d49de9695 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -1391,7 +1391,7 @@ iobuf_esopen (estream_t estream, const char *mode, int keep_open) { iobuf_t a; file_es_filter_ctx_t *fcx; - size_t len; + size_t len = 0; a = iobuf_alloc (strchr (mode, 'w') ? IOBUF_OUTPUT : IOBUF_INPUT, IOBUF_BUFFER_SIZE); |