mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
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
This commit is contained in:
parent
e2e822d225
commit
e7cbce8fb2
@ -1107,7 +1107,7 @@ iobuf_open( const char *fname )
|
||||
IOBUF a;
|
||||
FILEP_OR_FD fp;
|
||||
file_filter_ctx_t *fcx;
|
||||
size_t len;
|
||||
size_t len = 0;
|
||||
int print_only = 0;
|
||||
int fd;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user