mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01:00
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 <justus@g10code.com>
This commit is contained in:
parent
52f7f195b1
commit
eb957ffc47
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user