Page MenuHome GnuPG

Fix possible uninitialized err variable in libskba der builder
Closed, ResolvedPublic

Description

We got a report about a usage of possible uninitialized variable in libksba. After revieving the report, this one sounds like a positive

"Error: UNINIT (CWE-457):
libksba-1.5.1/src/der-builder.c:552: var_decl: Declaring variable ""err"" without initializer.
libksba-1.5.1/src/der-builder.c:666: uninit_use: Using uninitialized value ""err"".

  1.  664|    leave:
  2.  665|     xfree (buffer);
  3.  666|->   return err;
  4.  667|   }"

The variable err is used uninitialized when no error happens along the way if I do not miss something.

The fix is trivial, but attached here:

Details

Version
master

Related Objects