~ubuntu-branches/ubuntu/precise/mesa/precise-security

« back to all changes in this revision

Viewing changes to src/glsl/builtins/tools/texture_builtins.py

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers, Steve Beattie
  • Date: 2012-10-19 09:04:04 UTC
  • mfrom: (163.1.4 precise-proposed)
  • Revision ID: package-import@ubuntu.com-20121019090404-5zbjpsp6knv7zl3b
Tags: 8.0.4-0ubuntu0.2
[ Steve Beattie ]
* SECURITY UPDATE: samplers array overflow (LP: #1046933)
  - debian/patches/50-CVE-2012-2864.patch: ensure that more than
    MAX_SAMPLERS are not used
  - CVE-2012-2864

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
55
55
    coord_dim = get_coord_dim(sampler_type)
56
56
    extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields)
57
 
    offset_dim = get_sampler_dim(sampler_type)
 
57
    sampler_dim = get_sampler_dim(sampler_type)
58
58
 
59
59
    if variant & Single:
60
60
        return_type = "float"
74
74
    elif tex_inst == "txf" or tex_inst == "txs":
75
75
        print "\n       (declare (in) int lod)",
76
76
    elif tex_inst == "txd":
77
 
        grad_type = vec_type("", coord_dim)
 
77
        grad_type = vec_type("", sampler_dim)
78
78
        print "\n       (declare (in) " + grad_type + " dPdx)",
79
79
        print "\n       (declare (in) " + grad_type + " dPdy)",
80
80
 
81
81
    if variant & Offset:
82
 
        print "\n       (declare (const_in) " + vec_type("i", offset_dim) + " offset)",
 
82
        print "\n       (declare (const_in) " + vec_type("i", sampler_dim) + " offset)",
83
83
    if tex_inst == "txb":
84
84
        print "\n       (declare (in) float bias)",
85
85