protect call to glPrimitiveRestartIndex

Otherwise, it'd be possible to generate evil commands from a rouge
guest-driver that can crash the VM.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Erik Faye-Lund 7 years ago committed by Dave Airlie
parent ec454b9df0
commit 89f7995746
  1. 2
      src/vrend_renderer.c

@ -3430,7 +3430,7 @@ void vrend_draw_vbo(struct vrend_context *ctx,
} else if (vrend_state.have_nv_prim_restart) {
glEnableClientState(GL_PRIMITIVE_RESTART_NV);
glPrimitiveRestartIndexNV(info->restart_index);
} else {
} else if (vrend_state.have_gl_prim_restart) {
glEnable(GL_PRIMITIVE_RESTART);
glPrimitiveRestartIndex(info->restart_index);
}

Loading…
Cancel
Save