Skip to content

Commit

Permalink
Jestem oaza spokoju...
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Oct 5, 2023
1 parent 36964fb commit d378c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions core/pbcc_crypto.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */

#if PUBNUB_CRYPTO_API

#include <stdint.h>
#include <stdio.h>
#include "pbbase64.h"
#include "pbcc_crypto.h"
#if PUBNUB_CRYPTO_API
#include "pbsha256.h"
#endif
#include "pbaes256.h"
#include "pubnub_crypto.h"
#include "pubnub_log.h"
Expand Down Expand Up @@ -285,3 +285,6 @@ pubnub_bymebl_t pbcc_base64_decode(const char* buffer) {
void pbcc_set_crypto_module(struct pbcc_context *ctx, struct pubnub_crypto_provider_t *crypto_provider) {
ctx->crypto_module = crypto_provider;
}

#endif

2 changes: 1 addition & 1 deletion core/pbcc_crypto_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int legacy_decrypt(
) {
struct legacy_context *ctx = (struct legacy_context *)algo->user_data;

size_t estimated_size = estimated_dec_buffer_size(to_decrypt.data.size) + 100000; // TODO: WHY!?!?!?
size_t estimated_size = estimated_dec_buffer_size(to_decrypt.data.size); // TODO: WHY!?!?!?
result->ptr = (uint8_t*)malloc(estimated_size);
memset(result->ptr, 0, estimated_size);
if (NULL == result->ptr) {
Expand Down

0 comments on commit d378c6a

Please sign in to comment.