test-json: do not pass ephemeral array as intializer to JSON_BUILD_STRV
Fixes #11600. The code was effectively doing: json_build(..., ({ char **_x = ((char**) ((const char*[]) {"one", "two", "three", "four", NULL })); _x; })); but there was no guarantee that the storage for the array that _x points to survives pass the end of the block. Essentially, STRV_MAKE cannot be used inline inside of a block like this.
Loading
Please register or sign in to comment