From ac380e90626f1f007cdf7e17b87e50343eaf66ff Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 19 Jun 2020 13:30:06 +0200 Subject: Fix error in libaxl_receive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libaxl_receive.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libaxl_receive.c') diff --git a/libaxl_receive.c b/libaxl_receive.c index 11ca644..e35cf1b 100644 --- a/libaxl_receive.c +++ b/libaxl_receive.c @@ -393,7 +393,6 @@ libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, case '?': /* We know it is LIBAXL_REPLY message */ goto received_reply; - break; default: abort(); @@ -463,7 +462,7 @@ received_reply: break; case '2': - if (i + 2 <= n) { + if (i + 2 >= n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -473,7 +472,7 @@ received_reply: break; case '4': - if (i + 4 <= n) { + if (i + 4 >= n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -490,7 +489,7 @@ received_reply: break; case 's': - if (i + 2 <= n) { + if (i + 2 >= n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -501,7 +500,7 @@ received_reply: break; case 'S': - if (i + 4 <= n) { + if (i + 4 >= n) { liberror_save_backtrace(NULL); goto short_msg; } -- cgit v1.2.3-70-g09d2