From: Kern Sibbald Date: Sat, 16 Jun 2007 14:46:37 +0000 (+0000) Subject: Fix seg fault in FD. X-Git-Tag: Release-7.0.0~6129 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dad62b681a91d2d7a0a3d7336f57955bbf4ce3da;p=bacula%2Fbacula Fix seg fault in FD. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5026 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 7b30be21a3..e4651c7c19 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -592,7 +592,8 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) sd->fsend("%ld %d 0", jcr->JobFiles, digest_stream); Dmsg1(300, "bfiled>stored:header %s\n", sd->msg); - size = sizeof(CRYPTO_DIGEST_MAX_SIZE); + size = CRYPTO_DIGEST_MAX_SIZE; + /* Grow the bsock buffer to fit our message if necessary */ if (sizeof_pool_memory(sd->msg) < (int32_t)size) { sd->msg = realloc_pool_memory(sd->msg, size); diff --git a/bacula/src/lib/crypto.c b/bacula/src/lib/crypto.c index 66b377ff90..1c957b0f6d 100644 --- a/bacula/src/lib/crypto.c +++ b/bacula/src/lib/crypto.c @@ -1551,7 +1551,10 @@ int cleanup_crypto (void) { return 0; } SIGNATURE *crypto_sign_new(JCR *jcr) { return NULL; } -crypto_error_t crypto_sign_get_digest (SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST **digest) { return CRYPTO_ERROR_INTERNAL; } +crypto_error_t crypto_sign_get_digest (SIGNATURE *sig, X509_KEYPAIR *keypair, + crypto_digest_t &type, DIGEST **digest) + { return CRYPTO_ERROR_INTERNAL; } + crypto_error_t crypto_sign_verify (SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST *digest) { return CRYPTO_ERROR_INTERNAL; } int crypto_sign_add_signer (SIGNATURE *sig, DIGEST *digest, X509_KEYPAIR *keypair) { return false; } diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index ac960a15bf..32183bc6b7 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -3,6 +3,7 @@ General: Release: 2.1.16 beta 16Jun07 +kes Fix seg fault in FD. kes Remove a few malloc()s from the encryption code. kes Use the class calls to bsock in filed/backup.c and restore.c in place of the old bnet_xxx code.