]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/crypto.c
Ignore UTF-8 marker at the start of .conf files.
[bacula/bacula] / bacula / src / lib / crypto.c
index 9b943d2bf78d68649283e2828f021dc4c20f172d..af206985dc53493558904b4c873cc89ae105fda8 100644 (file)
@@ -1134,6 +1134,11 @@ crypto_error_t crypto_session_decode(const uint8_t *data, uint32_t length, alist
    unsigned char *p = (unsigned char *)data;
 #endif
 
+   /* bacula-fd.conf doesn't contains any key */
+   if (!keypairs) {
+      return CRYPTO_ERROR_NORECIPIENT;
+   }
+
    cs = (CRYPTO_SESSION *) malloc(sizeof(CRYPTO_SESSION));
    if (!cs) {
       return CRYPTO_ERROR_INTERNAL;