From: Tobias Brunner Date: Wed, 4 Mar 2020 16:07:32 +0000 (+0100) Subject: script: Fix upper bounds X-Git-Tag: 5.8.3rc1~12 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0399314903c917ee0f769819d1b137d9ec8c8b3f;p=thirdparty%2Fstrongswan.git script: Fix upper bounds ^ is the XOR operator. --- diff --git a/scripts/crypt_burn.c b/scripts/crypt_burn.c index bf338f0b4e..70ec4573a2 100644 --- a/scripts/crypt_burn.c +++ b/scripts/crypt_burn.c @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) if (argc > 2) { len = atoi(argv[2]); - if (len > (2^30)) + if (len > (1 << 30)) { fprintf(stderr, "buffer too large (1 GiB limit)\n"); return 1; diff --git a/scripts/pubkey_speed.c b/scripts/pubkey_speed.c index 21e4d2c1ef..0dcc7b0f54 100644 --- a/scripts/pubkey_speed.c +++ b/scripts/pubkey_speed.c @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) } rounds = atoi(argv[3]); - if (rounds < 0 || rounds > (2^26)) + if (rounds < 0 || rounds > (1 << 26)) { /* arbitrary limit to the number of chunk_t/sigs that fit into 1 GiB */ usage(); }