aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-19 13:47:39 +0200
committerMattias Andrée <maandree@kth.se>2020-06-19 13:47:39 +0200
commit267cdfe9b148a4ee1f2043bbeafc1bcfb355acd7 (patch)
treefa00795c065ce03d21e2aed4671c52f5b9d90582
parentFix error in libaxl_receive (diff)
downloadlibaxl-267cdfe9b148a4ee1f2043bbeafc1bcfb355acd7.tar.gz
libaxl-267cdfe9b148a4ee1f2043bbeafc1bcfb355acd7.tar.bz2
libaxl-267cdfe9b148a4ee1f2043bbeafc1bcfb355acd7.tar.xz
Fix libaxl_receive
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--libaxl_receive.c16
1 files changed, 8 insertions, 8 deletions
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;
}