summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcryptobox/base64/ref.c2
-rw-r--r--src/libcryptobox/base64/sse42.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcryptobox/base64/ref.c b/src/libcryptobox/base64/ref.c
index 2d757fe23..797a91ce7 100644
--- a/src/libcryptobox/base64/ref.c
+++ b/src/libcryptobox/base64/ref.c
@@ -215,7 +215,7 @@ repeat:
if (!ret && inlen > 0) {
/* Skip to the next valid character in input */
- while (base64_table_dec[*c] >= 254 && inlen > 0) {
+ while (inlen > 0 && base64_table_dec[*c] >= 254) {
c ++;
inlen --;
}
diff --git a/src/libcryptobox/base64/sse42.c b/src/libcryptobox/base64/sse42.c
index 12c6e3413..db585a637 100644
--- a/src/libcryptobox/base64/sse42.c
+++ b/src/libcryptobox/base64/sse42.c
@@ -244,7 +244,7 @@ repeat:
if (!ret && inlen > 0) {
/* Skip to the next valid character in input */
- while (base64_table_dec[*c] >= 254 && inlen > 0) {
+ while (inlen > 0 && base64_table_dec[*c] >= 254) {
c ++;
inlen --;
}