From: Zebediah Figura zfigura@codeweavers.com
--- libs/vkd3d-shader/dxbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 5c990056..cb50f438 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -109,7 +109,7 @@ struct vkd3d_sm4_opcode_info enum vkd3d_sm4_opcode opcode; enum vkd3d_shader_opcode handler_idx; const char *dst_info; - const char *src_info; + char src_info[DXBC_MAX_SOURCE_COUNT]; void (*read_opcode_func)(struct vkd3d_shader_instruction *ins, uint32_t opcode, uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv); }; @@ -1520,7 +1520,7 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_parser *parser, stru ins->predicate = NULL; ins->dst_count = strlen(opcode_info->dst_info); ins->dst = sm4->dst_param; - ins->src_count = strlen(opcode_info->src_info); + ins->src_count = strnlen(opcode_info->src_info, DXBC_MAX_SOURCE_COUNT); ins->src = sm4->src_param; assert(ins->dst_count <= ARRAY_SIZE(sm4->dst_param)); assert(ins->src_count <= ARRAY_SIZE(sm4->src_param));