]> wagner.pp.ru Git - openssl-gost/engine.git/commit
gost_prov: Avoid access to unallocated memory
authorVitaly Chikunov <vt@altlinux.org>
Sat, 8 Jan 2022 23:34:57 +0000 (02:34 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Sun, 9 Jan 2022 10:57:41 +0000 (13:57 +0300)
commiteea1e27c2b49d7604df939aeefaa7f45a5519fc8
tree151f2b5276cb700b76fc2f83724b6d1bbf7bb0dd
parent5dc8f91c186d88a74493c229c7afbf3eb40599a8
gost_prov: Avoid access to unallocated memory

This should fix Coverity warning:

  *** CID 345245:    (UNINIT)
  /gost_prov.c: 71 in provider_ctx_new()
  65             && populate_gost_engine(ctx->e)) {
  66             ctx->core_handle = core;
  67
  68             /* Ugly hack */
  69             err_handle = ctx->proverr_handle;
  70         } else {
  >>>     CID 345245:    (UNINIT)
  >>>     Using uninitialized value "ctx->e" when calling "provider_ctx_free".
  71             provider_ctx_free(ctx);
  72             ctx = NULL;
  73         }
  74         return ctx;
  75     }

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Issue: #380
gost_prov.c