- Timestamp:
- Feb 29, 2016, 8:59:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_static.c
r481 r501 999 999 return -1; 1000 1000 1001 while ((l = data[offset])){1001 do { 1002 1002 1003 1003 if (offset < INT_MAX) … … 1005 1005 else 1006 1006 return -1; 1007 1008 l = data[offset]; 1007 1009 1008 1010 if ((l & 0xc0) == (0xc0)) { … … 1018 1020 else 1019 1021 return -1; 1020 } 1022 1023 } while (l); 1021 1024 1022 1025 return offset - orig_offset; … … 1052 1055 if (offset < INT_MAX) offset++; 1053 1056 else return -1; 1054 if (measure && (total < INT_MAX))1055 total++;1057 if (measure) 1058 { if (total < INT_MAX) total++; else return -1; } 1056 1059 if ((l & 0xc0) == (0xc0)) { 1057 if (measure && (total < INT_MAX))1058 total++;1060 if (measure) 1061 { if (total < INT_MAX) total++; else return -1; } 1059 1062 /* compressed item, redirect */ 1060 1063 offset = ((l & 0x3f) << 8) | data[offset]; … … 1082 1085 else 1083 1086 return -1; 1084 if (measure && (total <= (INT_MAX - l)))1085 total += l;1087 if (measure) 1088 { if (total <= (INT_MAX -l)) total += l; else return -1; } 1086 1089 1087 1090 if (used == INT_MAX) … … 1094 1097 1095 1098 /* The null byte must be counted too */ 1096 if (measure && (total < INT_MAX)) {1097 total++;1099 if (measure) { 1100 if (total < INT_MAX) total++; else return -1; 1098 1101 } 1099 1102
Note:
See TracChangeset
for help on using the changeset viewer.