Skip to content

Commit

Permalink
spa: use sized local info rather than incoming
Browse files Browse the repository at this point in the history
We allow a default 0 length in the incoming const info to mean a default
size (of 512).  We implement it by copying the incoming const info to a
copy in the spa that we can adapt, which is all good.

But in two cases after we dumbly use the incoming const info directly
instead of the adapted copy.

#3294
  • Loading branch information
lws-team committed Dec 13, 2024
1 parent 6328231 commit d568ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/roles/http/server/lws-spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ lws_spa_create_via_info(struct lws *wsi, const lws_spa_create_info_t *i)
if (!spa->storage)
goto bail2;

spa->end = spa->storage + i->max_storage - 1;
spa->end = spa->storage + spa->i.max_storage - 1;

if (i->count_params) {
if (i->ac)
Expand All @@ -599,7 +599,7 @@ lws_spa_create_via_info(struct lws *wsi, const lws_spa_create_info_t *i)
goto bail3;
}

spa->s = lws_urldecode_s_create(spa, wsi, spa->storage, i->max_storage,
spa->s = lws_urldecode_s_create(spa, wsi, spa->storage, spa->i.max_storage,
lws_urldecode_spa_cb);
if (!spa->s)
goto bail4;
Expand Down

0 comments on commit d568ecc

Please sign in to comment.