patch-src_target-based_sf_attribute_table_parser_c 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- snort-2.9.5.orig/src/target-based/sf_attribute_table_parser.c 2013-06-04 23:23:12.000000000 +0200
  2. +++ snort-2.9.5/src/target-based/sf_attribute_table_parser.c 2013-07-17 11:10:59.000000000 +0200
  3. @@ -73,7 +73,6 @@ typedef int flex_int32_t;
  4. typedef unsigned char flex_uint8_t;
  5. typedef unsigned short int flex_uint16_t;
  6. typedef unsigned int flex_uint32_t;
  7. -#endif /* ! C99 */
  8. /* Limits of integral types. */
  9. #ifndef INT8_MIN
  10. @@ -104,6 +103,8 @@ typedef unsigned int flex_uint32_t;
  11. #define UINT32_MAX (4294967295U)
  12. #endif
  13. +#endif /* ! C99 */
  14. +
  15. #endif /* ! FLEXINT_H */
  16. #ifdef __cplusplus
  17. @@ -160,7 +161,15 @@ typedef unsigned int flex_uint32_t;
  18. /* Size of default input buffer. */
  19. #ifndef YY_BUF_SIZE
  20. +#ifdef __ia64__
  21. +/* On IA-64, the buffer size is 16k, not 8k.
  22. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  23. + * Ditto for the __ia64__ case accordingly.
  24. + */
  25. +#define YY_BUF_SIZE 32768
  26. +#else
  27. #define YY_BUF_SIZE 16384
  28. +#endif /* __ia64__ */
  29. #endif
  30. /* The state buf must be large enough to hold one state per character in the main buffer.
  31. @@ -6264,7 +6273,7 @@ int sfat_parse(void);
  32. /* Rules Section.
  33. * All rules are in here prior to second "%%" seperator
  34. */
  35. -#line 6268 "sf_attribute_table_parser.c"
  36. +#line 6277 "sf_attribute_table_parser.c"
  37. #define INITIAL 0
  38. #define waiting_for_comma_prior_to_data 1
  39. @@ -6345,7 +6354,12 @@ static int input (void );
  40. /* Amount of stuff to slurp up with each read. */
  41. #ifndef YY_READ_BUF_SIZE
  42. +#ifdef __ia64__
  43. +/* On IA-64, the buffer size is 16k, not 8k */
  44. +#define YY_READ_BUF_SIZE 16384
  45. +#else
  46. #define YY_READ_BUF_SIZE 8192
  47. +#endif /* __ia64__ */
  48. #endif
  49. /* Copy whatever the last rule matched to the standard output. */
  50. @@ -6364,7 +6378,7 @@ static int input (void );
  51. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  52. { \
  53. int c = '*'; \
  54. - unsigned n; \
  55. + size_t n; \
  56. for ( n = 0; n < max_size && \
  57. (c = getc( sfatin )) != EOF && c != '\n'; ++n ) \
  58. buf[n] = (char) c; \
  59. @@ -6448,7 +6462,7 @@ YY_DECL
  60. #line 100 "sf_attribute_table_parser.l"
  61. -#line 6452 "sf_attribute_table_parser.c"
  62. +#line 6466 "sf_attribute_table_parser.c"
  63. if ( !(yy_init) )
  64. {
  65. @@ -6842,7 +6856,7 @@ YY_RULE_SETUP
  66. #line 186 "sf_attribute_table_parser.l"
  67. ECHO;
  68. YY_BREAK
  69. -#line 6846 "sf_attribute_table_parser.c"
  70. +#line 6860 "sf_attribute_table_parser.c"
  71. case YY_END_OF_BUFFER:
  72. {
  73. @@ -7558,8 +7572,8 @@ YY_BUFFER_STATE sfat_scan_string (yycons
  74. /** Setup the input buffer state to scan the given bytes. The next call to sfatlex() will
  75. * scan from a @e copy of @a bytes.
  76. - * @param bytes the byte buffer to scan
  77. - * @param len the number of bytes in the buffer pointed to by @a bytes.
  78. + * @param yybytes the byte buffer to scan
  79. + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  80. *
  81. * @return the newly allocated buffer state object.
  82. */