1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: policy: atoll needed for 32-bit machines

On 32-bit Linux compilers, long int == int == 32-bit.  So even atol() cannot
handle ints above 0x7fffffff and clips any it finds at that.

There's only one instance in policy-json.c, use atoll() cast to uint64_t
to allow values up to 64-bit INT_MAX even on 32-bit machines.
This commit is contained in:
Andy Green 2021-04-07 09:50:02 +01:00
parent b153305506
commit 877fcc3e4d

View file

@ -566,7 +566,7 @@ lws_ss_policy_parser_cb(struct lejp_ctx *ctx, char reason)
goto string2;
case LSSPPT_METRICS_US_SCHEDULE:
a->curr[LTY_METRICS].m->us_schedule = (uint64_t)atol(ctx->buf);
a->curr[LTY_METRICS].m->us_schedule = (uint64_t)atoll(ctx->buf);
break;
case LSSPPT_METRICS_US_HALFLIFE: