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

« back to all changes in this revision

Viewing changes to src/glsl/glcpp/glcpp-lex.c

  • 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
typedef unsigned char flex_uint8_t; 
55
55
typedef unsigned short int flex_uint16_t;
56
56
typedef unsigned int flex_uint32_t;
 
57
#endif /* ! C99 */
57
58
 
58
59
/* Limits of integral types. */
59
60
#ifndef INT8_MIN
84
85
#define UINT32_MAX             (4294967295U)
85
86
#endif
86
87
 
87
 
#endif /* ! C99 */
88
 
 
89
88
#endif /* ! FLEXINT_H */
90
89
 
91
90
#ifdef __cplusplus
159
158
 
160
159
/* Size of default input buffer. */
161
160
#ifndef YY_BUF_SIZE
162
 
#ifdef __ia64__
163
 
/* On IA-64, the buffer size is 16k, not 8k.
164
 
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
165
 
 * Ditto for the __ia64__ case accordingly.
166
 
 */
167
 
#define YY_BUF_SIZE 32768
168
 
#else
169
161
#define YY_BUF_SIZE 16384
170
 
#endif /* __ia64__ */
171
162
#endif
172
163
 
173
164
/* The state buf must be large enough to hold one state per character in the main buffer.
657
648
strings, we have to be careful to avoid OTHER matching and hiding
658
649
something that CPP does care about. So we simply exclude all
659
650
characters that appear in any other expressions. */
660
 
#line 661 "glcpp/glcpp-lex.c"
 
651
#line 652 "glcpp/glcpp-lex.c"
661
652
 
662
653
#define INITIAL 0
663
654
#define DONE 1
757
748
 
758
749
void glcpp_set_lineno (int line_number ,yyscan_t yyscanner );
759
750
 
 
751
int glcpp_get_column  (yyscan_t yyscanner );
 
752
 
 
753
void glcpp_set_column (int column_no ,yyscan_t yyscanner );
 
754
 
760
755
YYSTYPE * glcpp_get_lval (yyscan_t yyscanner );
761
756
 
762
757
void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
805
800
    
806
801
/* Amount of stuff to slurp up with each read. */
807
802
#ifndef YY_READ_BUF_SIZE
808
 
#ifdef __ia64__
809
 
/* On IA-64, the buffer size is 16k, not 8k */
810
 
#define YY_READ_BUF_SIZE 16384
811
 
#else
812
803
#define YY_READ_BUF_SIZE 8192
813
 
#endif /* __ia64__ */
814
804
#endif
815
805
 
816
806
/* Copy whatever the last rule matched to the standard output. */
829
819
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
830
820
                { \
831
821
                int c = '*'; \
832
 
                size_t n; \
 
822
                unsigned n; \
833
823
                for ( n = 0; n < max_size && \
834
824
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
835
825
                        buf[n] = (char) c; \
932
922
        }
933
923
 
934
924
        /* Single-line comments */
935
 
#line 936 "glcpp/glcpp-lex.c"
 
925
#line 926 "glcpp/glcpp-lex.c"
936
926
 
937
927
    yylval = yylval_param;
938
928
 
1424
1414
#line 326 "glcpp/glcpp-lex.l"
1425
1415
ECHO;
1426
1416
        YY_BREAK
1427
 
#line 1428 "glcpp/glcpp-lex.c"
 
1417
#line 1418 "glcpp/glcpp-lex.c"
1428
1418
                        case YY_STATE_EOF(DONE):
1429
1419
                        case YY_STATE_EOF(COMMENT):
1430
1420
                        case YY_STATE_EOF(UNREACHABLE):
2164
2154
 
2165
2155
/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will
2166
2156
 * scan from a @e copy of @a bytes.
2167
 
 * @param yybytes the byte buffer to scan
2168
 
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 
2157
 * @param bytes the byte buffer to scan
 
2158
 * @param len the number of bytes in the buffer pointed to by @a bytes.
2169
2159
 * @param yyscanner The scanner object.
2170
2160
 * @return the newly allocated buffer state object.
2171
2161
 */