diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-07-07 15:50:52 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-07-07 19:32:03 +0200 |
commit | 0fdf8c3d4a4348452f28c037e422c489605c91d7 (patch) | |
tree | 001ae905ff25fb5a037b2f13d3a1067cbbdde8d8 | |
parent | 0a7547e487a8bc4e7ac9599c55579eb2e4a13f06 (diff) | |
download | libgcrypt-0fdf8c3d4a4348452f28c037e422c489605c91d7.tar.gz |
sexp: fix invalid deallocation in error path
* src/sexp.c: Fix wrong condition in error path.
--
This appears to be a copy and paste error and could result in wrong
memory being freed in the error path (when arrayisdesx[idx] == 2, the
condition ((!2) == 1) is false).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | src/sexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2405,7 +2405,7 @@ _gcry_sexp_vextract_param (gcry_sexp_t sexp, const char *path, _gcry_mpi_release (*array[idx]); *array[idx] = NULL; } - else if (!arrayisdesc[idx] == 1) + else if (arrayisdesc[idx] == 1) { /* Caller provided buffer. */ gcry_buffer_t *spec = (gcry_buffer_t*)array[idx]; |