Changeset 6d0e133 in mainline
- Timestamp:
- 2025-04-14T08:30:07Z (4 days ago)
- Branches:
- master
- Children:
- 6120b7b
- Parents:
- f5e1692
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/str.c
rf5e1692 r6d0e133 226 226 unsigned int b0_bits = 6 - cbytes; /* Data bits in first byte */ 227 227 228 if ( *offset + cbytes > size)228 if (cbytes < 0 || *offset + cbytes > size) 229 229 return U_SPECIAL; 230 230 … … 233 233 /* Decode continuation bytes */ 234 234 while (cbytes > 0) { 235 uint8_t b = (uint8_t) str[ (*offset)++];235 uint8_t b = (uint8_t) str[*offset]; 236 236 237 237 if (!_is_continuation_byte(b)) 238 238 return U_SPECIAL; 239 240 (*offset)++; 239 241 240 242 /* Shift data bits to ch */
Note:
See TracChangeset
for help on using the changeset viewer.