From 2321945e4419a35337d77cd0e91866758bfa5533 Mon Sep 17 00:00:00 2001
From: Philippe Antoine <contact@catenacyber.fr>
Date: Wed, 10 Jul 2019 08:26:04 +0200
Subject: [PATCH] Syntax fix

---
 programs/fuzz/common.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/programs/fuzz/common.c b/programs/fuzz/common.c
index 169b4804fe..df0da358bf 100644
--- a/programs/fuzz/common.c
+++ b/programs/fuzz/common.c
@@ -27,9 +27,9 @@ int dummy_send( void *ctx, const unsigned char *buf, size_t len )
 
     //pretends we wrote everything ok
     if (len > INT_MAX) {
-        return -1;
+        return (-1);
     }
-    return int( len );
+    return (int) ( len );
 }
 
 int fuzz_recv( void *ctx, unsigned char *buf, size_t len )
@@ -41,13 +41,16 @@ int fuzz_recv( void *ctx, unsigned char *buf, size_t len )
         //EOF
         return (0);
     }
+    if (len > INT_MAX) {
+        return (-1);
+    }
     if (len + biomemfuzz->Offset > biomemfuzz->Size) {
         //do not overflow
         len = biomemfuzz->Size - biomemfuzz->Offset;
     }
     memcpy(buf, biomemfuzz->Data + biomemfuzz->Offset, len);
     biomemfuzz->Offset += len;
-    return( len );
+    return (int) ( len );
 }
 
 int dummy_random( void *p_rng, unsigned char *output, size_t output_len )