Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
G
glslang
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • glslang
  • Repository

Switch branch/tag
  • glslang
  • SPIRV
  • SpvBuilder.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Fix OOB write in matrix constructor · cfdeeb84
    Shahbaz Youssefi authored Jun 03, 2021
    In a matrix constructor that takes a number of components, as many
    components as necessary must be taken, with the rest discarded, as GLSL
    allows more components than necessary to be specified.  For example, the
    following:
    
        mat4 m4 = mat4(v4, v4.yzwx, v4.zwx, v4.zwxy, v4.wxyz);
    
    is equivalent to:
    
        mat4 m4 = mat4(v4, v4.yzwx, v4.zwx, v4.zwxy, v4.w);
    
    glslang takes the components from the constructor and builds the single
    components of the matrix in a 2D array before constructing the matrix
    itself.  It however did not check for extra parameters and was thus
    writing OOB to said 2D array.  This is fixed in this change
    Signed-off-by: 's avatarShahbaz Youssefi <shabbyx@gmail.com>
    cfdeeb84
SpvBuilder.cpp 109 KB
EditWeb IDE
×

Replace SpvBuilder.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.