From: Tobias Brunner Date: Mon, 4 May 2020 14:56:47 +0000 (+0200) Subject: scripts: Initialize libstrongswan in id2sql to fix a crash X-Git-Tag: 5.9.0dr1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3e7b79cc5b9387e3d22f9ca995119e64c9fc9a0;p=thirdparty%2Fstrongswan.git scripts: Initialize libstrongswan in id2sql to fix a crash Since 770f4ccee12d ("identification: Optionally match RDNs in any order and accept missing RDNs") the DN parser requires lib->settings. --- diff --git a/scripts/id2sql.c b/scripts/id2sql.c index a4035cf25c..fe55288b38 100644 --- a/scripts/id2sql.c +++ b/scripts/id2sql.c @@ -14,6 +14,8 @@ */ #include + +#include #include /** @@ -25,6 +27,9 @@ int main(int argc, char *argv[]) chunk_t enc; int i; + library_init(NULL, "id2sql"); + atexit(library_deinit); + if (argc < 2) { return -1; @@ -45,6 +50,7 @@ int main(int argc, char *argv[]) printf("%02x", (unsigned int)enc.ptr[i]); } printf("'\n"); + id->destroy(id); return 0; }