Changeset 1943 in kBuild
- Timestamp:
- Oct 26, 2008 2:19:06 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/strcache2.c
r1940 r1943 1052 1052 { 1053 1053 struct strcache2_entry const *entry; 1054 unsigned hash; 1054 unsigned int hash; 1055 unsigned int length; 1055 1056 const char *end; 1056 1057 … … 1064 1065 } 1065 1066 1066 end = memchr (str, '\0', entry->length); 1067 if ((size_t)(end - str) == entry->length) 1067 end = memchr (str, '\0', entry->length + 1); 1068 length = end - str; 1069 if (length != entry->length) 1068 1070 { 1069 1071 fprintf (stderr, 1070 "strcache2[%s]: corrupt entry %p, length: % lu, expected %u;\nstring: %s\n",1071 cache->name, (void *)entry, (unsigned long)(end - str), entry->length, str);1072 "strcache2[%s]: corrupt entry %p, length: %u, expected %u;\nstring: %s\n", 1073 cache->name, (void *)entry, length, entry->length, str); 1072 1074 return -1; 1073 1075 }
Note:
See TracChangeset
for help on using the changeset viewer.