obs-shaderfilter icon indicating copy to clipboard operation
obs-shaderfilter copied to clipboard

Buffer overflow in string parameters with escaped characters

Open shole opened this issue 2 years ago • 1 comments

If string variable contains escaped characters, such as \", both are counted but only the " is printed, resulting in UI printing past actual string variable

Reproduction example below;

uniform string infooverflow<
    string widget_type = "info";
> = "here's some escaped \" characters: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\" and some more text";
uniform string stringoverflow="also works with straight string \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"";
float4 mainImage(VertData v_in) : TARGET {
	return image.Sample(textureSampler, v_in.uv);
}

Looks like this in OBS https://i.imgur.com/Hc7CVqU.png

shole avatar Dec 27 '23 19:12 shole

That looks to be a bug in OBS, not in the plugin. Let me see if I can make a fix for it.

exeldro avatar Dec 28 '23 06:12 exeldro