2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/str-two-way.h (critical_factorization): Cast the index
        operation to ensure unsigned rollover occurs when adding to SIZE_MAX.
			
			
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | 2008-10-02  Jeff Johnston  <jjohnstn@redhat.com> | ||||||
|  |  | ||||||
|  | 	* libc/string/str-two-way.h (critical_factorization): Cast the index | ||||||
|  | 	operation to ensure unsigned rollover occurs when adding to SIZE_MAX. | ||||||
|  |  | ||||||
| 2008-10-02  Jeff Johnston  <jjohnstn@redhat.com> | 2008-10-02  Jeff Johnston  <jjohnstn@redhat.com> | ||||||
|  |  | ||||||
| 	* libc/sys/linux/include/stdint.h (SIZE_MAX): Fix value which should | 	* libc/sys/linux/include/stdint.h (SIZE_MAX): Fix value which should | ||||||
|   | |||||||
| @@ -114,7 +114,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len, | |||||||
|   while (j + k < needle_len) |   while (j + k < needle_len) | ||||||
|     { |     { | ||||||
|       a = CANON_ELEMENT (needle[j + k]); |       a = CANON_ELEMENT (needle[j + k]); | ||||||
|       b = CANON_ELEMENT (needle[max_suffix + k]); |       b = CANON_ELEMENT (needle[(size_t)(max_suffix + k)]); | ||||||
|       if (a < b) |       if (a < b) | ||||||
| 	{ | 	{ | ||||||
| 	  /* Suffix is smaller, period is entire prefix so far.  */ | 	  /* Suffix is smaller, period is entire prefix so far.  */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user