]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util: right parenthesises for base64 macro
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 29 Nov 2021 12:20:40 +0000 (13:20 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 21 Apr 2022 07:31:56 +0000 (13:01 +0530)
So that BASE64_BUFFER_SIZE(3) == 5 instead of 7

src/util-crypt.h

index 15e165672648dce9207b68d068b3a6b4235e7bf0..1748c258e814095beb55ae20d8287e09e717a999 100644 (file)
@@ -33,7 +33,7 @@
  * required output bytes are 4 * ceil(input_len / 3) and an additional byte
  * for storing the NULL pointer.
  * */
-#define BASE64_BUFFER_SIZE(x)  ((4 * ((x) + 2) / 3) + 1)
+#define BASE64_BUFFER_SIZE(x) ((4 * (((x) + 2) / 3)) + 1)
 
 typedef enum {
     SC_SHA_1_OK,