Skip to content

Commit dc65edd

Browse files
committed
spa: use sized local info rather than incoming
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
1 parent 12e52ae commit dc65edd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/roles/http/server/lws-spa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ lws_spa_create_via_info(struct lws *wsi, const lws_spa_create_info_t *i)
570570
if (!spa->storage)
571571
goto bail2;
572572

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

575575
if (i->count_params) {
576576
if (i->ac)
@@ -583,7 +583,7 @@ lws_spa_create_via_info(struct lws *wsi, const lws_spa_create_info_t *i)
583583
goto bail3;
584584
}
585585

586-
spa->s = lws_urldecode_s_create(spa, wsi, spa->storage, i->max_storage,
586+
spa->s = lws_urldecode_s_create(spa, wsi, spa->storage, spa->i.max_storage,
587587
lws_urldecode_spa_cb);
588588
if (!spa->s)
589589
goto bail4;

0 commit comments

Comments
 (0)