From 1e7a9c1eaf163fb982753b0b75e70f0e2db37f81 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 27 Aug 2014 20:27:30 -0500 Subject: Fix incorrect rgbGen const reading uninitialized memory If ParseVector fails, color isn't fully set. --- src/renderergl1/tr_shader.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/renderergl1/tr_shader.c') diff --git a/src/renderergl1/tr_shader.c b/src/renderergl1/tr_shader.c index c44925a8..1408902d 100644 --- a/src/renderergl1/tr_shader.c +++ b/src/renderergl1/tr_shader.c @@ -848,6 +848,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) { vec3_t color; + VectorClear( color ); + ParseVector( text, 3, color ); stage->constantColor[0] = 255 * color[0]; stage->constantColor[1] = 255 * color[1]; -- cgit