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

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/util/u_linkage.h

  • 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:
49
49
 *
50
50
 * num_slots is the size of the layout array and hardware limit instead.
51
51
 *
52
 
 * efficient_slots == 0 or efficient_solts == num_slots are typical settings.
 
52
 * efficient_slots == 0 or efficient_slots == num_slots are typical settings.
53
53
 */
54
54
void util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots);
55
55
 
56
56
static INLINE void
57
 
util_semantic_table_from_layout(unsigned char *table, unsigned char *layout, unsigned char first_slot_value, unsigned char num_slots)
 
57
util_semantic_table_from_layout(unsigned char *table, size_t table_size, unsigned char *layout,
 
58
                                unsigned char first_slot_value, unsigned char num_slots)
58
59
{
59
 
   int i;
60
 
   memset(table, 0xff, sizeof(table));
 
60
   unsigned char i;
 
61
   memset(table, 0xff, table_size);
61
62
 
62
63
   for(i = 0; i < num_slots; ++i)
63
64
      table[layout[i]] = first_slot_value + i;