From 267cdfe9b148a4ee1f2043bbeafc1bcfb355acd7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 19 Jun 2020 13:47:39 +0200 Subject: Fix 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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libaxl_receive.c') diff --git a/libaxl_receive.c b/libaxl_receive.c index e35cf1b..2d79f64 100644 --- a/libaxl_receive.c +++ b/libaxl_receive.c @@ -347,7 +347,7 @@ libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, break; case '2': - if (i + 2 <= n) { + if (i + 2 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -356,7 +356,7 @@ libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, break; case '4': - if (i + 4 <= n) { + if (i + 4 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -371,7 +371,7 @@ libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, break; case 's': - if (i + 2 <= n) { + if (i + 2 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -381,7 +381,7 @@ libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, break; case 'S': - if (i + 4 <= n) { + if (i + 4 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -462,7 +462,7 @@ received_reply: break; case '2': - if (i + 2 >= n) { + if (i + 2 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -472,7 +472,7 @@ received_reply: break; case '4': - if (i + 4 >= n) { + if (i + 4 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -489,7 +489,7 @@ received_reply: break; case 's': - if (i + 2 >= n) { + if (i + 2 > n) { liberror_save_backtrace(NULL); goto short_msg; } @@ -500,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