Exploit databaseDownload repository ZIP
GH-557a35ec88cecc5153df8ffeda95d1c2
bob11vrdp/cve-2022-39425
Sources for CVE-2022-39425
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files85
bob11vrdp/cve-2022-39425Revision 1d03f54cf1ec
- ↑..Parent directory
- Makefile.am
- Makefile.in
- Makefile.sources
- README
- adapter9.c
- adapter9.h
- authenticatedchannel9.c
- authenticatedchannel9.h
- basetexture9.c
- basetexture9.h
- buffer9.c
- buffer9.h
- cryptosession9.c
- cryptosession9.h
- cubetexture9.c
- cubetexture9.h
- device9.c
- device9.h
- device9ex.c
- device9ex.h
- device9video.c
- device9video.h
- guid.c
- guid.h
- indexbuffer9.c
- indexbuffer9.h
- iunknown.c
- iunknown.h
- nine_buffer_upload.c
- nine_buffer_upload.h
- nine_csmt_helper.h
- nine_debug.c
- nine_debug.h
- nine_defines.h
- nine_dump.c
- nine_dump.h
- nine_ff.c
- nine_ff.h
- nine_flags.h
- nine_helpers.c
- nine_helpers.h
- nine_limits.h
- nine_lock.c
- nine_lock.h
- nine_pdata.h
- nine_pipe.c
- nine_pipe.h
- nine_queue.c
- nine_queue.h
- nine_quirk.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
VirtualBox-6.1.38/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/gallium/state_trackers/nine/nine_ff.h
Text · 3,376 bytes
#ifndef _NINE_FF_H_
#define _NINE_FF_H_
#include "device9.h"
#include "vertexdeclaration9.h"
boolean nine_ff_init(struct NineDevice9 *);
void nine_ff_fini(struct NineDevice9 *);
void nine_ff_update(struct NineDevice9 *);
void
nine_d3d_matrix_matrix_mul(D3DMATRIX *, const D3DMATRIX *, const D3DMATRIX *);
void
nine_d3d_vector4_matrix_mul(D3DVECTOR *, const D3DVECTOR *, const D3DMATRIX *);
void
nine_d3d_vector3_matrix_mul(D3DVECTOR *, const D3DVECTOR *, const D3DMATRIX *);
float
nine_d3d_matrix_det(const D3DMATRIX *);
void
nine_d3d_matrix_inverse(D3DMATRIX *, const D3DMATRIX *);
void
nine_d3d_matrix_transpose(D3DMATRIX *, const D3DMATRIX *);
#define NINED3DTSS_TCI_DISABLE 0
#define NINED3DTSS_TCI_PASSTHRU 1
#define NINED3DTSS_TCI_CAMERASPACENORMAL 2
#define NINED3DTSS_TCI_CAMERASPACEPOSITION 3
#define NINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 4
#define NINED3DTSS_TCI_SPHEREMAP 5
static inline unsigned
nine_decltype_get_dim(BYTE type)
{
switch (type) {
case D3DDECLTYPE_FLOAT1: return 1;
case D3DDECLTYPE_FLOAT2: return 2;
case D3DDECLTYPE_FLOAT3: return 3;
case D3DDECLTYPE_FLOAT4: return 4;
case D3DDECLTYPE_D3DCOLOR: return 1;
case D3DDECLTYPE_UBYTE4: return 4;
case D3DDECLTYPE_SHORT2: return 2;
case D3DDECLTYPE_SHORT4: return 4;
case D3DDECLTYPE_UBYTE4N: return 4;
case D3DDECLTYPE_SHORT2N: return 2;
case D3DDECLTYPE_SHORT4N: return 4;
case D3DDECLTYPE_USHORT2N: return 2;
case D3DDECLTYPE_USHORT4N: return 4;
case D3DDECLTYPE_UDEC3: return 3;
case D3DDECLTYPE_DEC3N: return 3;
case D3DDECLTYPE_FLOAT16_2: return 2;
case D3DDECLTYPE_FLOAT16_4: return 4;
default:
assert(!"Implementation error !");
}
return 0;
}
static inline uint16_t
nine_ff_get_projected_key(struct nine_context *context)
{
unsigned s, i;
uint16_t projected = 0;
char input_texture_coord[8];
memset(&input_texture_coord, 0, sizeof(input_texture_coord));
if (context->vdecl) {
for (i = 0; i < context->vdecl->nelems; i++) {
uint16_t usage = context->vdecl->usage_map[i];
if (usage % NINE_DECLUSAGE_COUNT == NINE_DECLUSAGE_TEXCOORD) {
s = usage / NINE_DECLUSAGE_COUNT;
if (s < 8)
input_texture_coord[s] = nine_decltype_get_dim(context->vdecl->decls[i].Type);
}
}
}
for (s = 0; s < 8; ++s) {
unsigned gen = (context->ff.tex_stage[s][D3DTSS_TEXCOORDINDEX] >> 16) + 1;
unsigned dim = context->ff.tex_stage[s][D3DTSS_TEXTURETRANSFORMFLAGS] & 0x7;
unsigned proj = !!(context->ff.tex_stage[s][D3DTSS_TEXTURETRANSFORMFLAGS] & D3DTTFF_PROJECTED);
if (!context->vs) {
if (dim > 4)
dim = input_texture_coord[s];
if (!dim && gen == NINED3DTSS_TCI_PASSTHRU)
dim = input_texture_coord[s];
else if (!dim)
dim = 4;
if (dim == 1) /* NV behaviour */
proj = 0;
if (dim > input_texture_coord[s] && gen == NINED3DTSS_TCI_PASSTHRU)
proj = 0;
} else {
dim = 4;
}
if (proj)
projected |= (dim-1) << (2 * s);
}
return projected;
}
#endif /* _NINE_FF_H_ */