Overview
Comment: | base64.m: Use int8_t instead of char.
char could be unsigned (like on OpenBSD) and thus cause trouble. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c8470f9c7e3cb844f664146066e0ccab |
User & Date: | js on 2012-07-21 21:16:16 |
Original User & Date: | js on 2012-07-21 21:16:17 |
Other Links: | manifest | tags |
Context
2012-07-21
| ||
21:16 | PLATFORMS.md: Add OpenBSD. check-in: 6be84017ef user: js tags: trunk | |
21:16 | base64.m: Use int8_t instead of char. check-in: c8470f9c7e user: js tags: trunk | |
21:16 | lookup-ppc-elf.S: Compatibility with OF_SELUID16. check-in: f213fe567c user: js tags: trunk | |
Changes
Modified src/base64.m from [b831cbbe10] to [afe4456b9c].
︙ | ︙ | |||
107 108 109 110 111 112 113 | if ([data itemSize] != 1) return NO; for (i = 0; i < length; i += 4) { uint32_t sb = 0; uint8_t count = 3; char db[3]; | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | if ([data itemSize] != 1) return NO; for (i = 0; i < length; i += 4) { uint32_t sb = 0; uint8_t count = 3; char db[3]; int8_t tmp; if (buffer[i] > 0x7F || buffer[i + 1] > 0x7F || buffer[i + 2] > 0x7F || buffer[i + 3] > 0x7F) return NO; if (buffer[i] == '=' || buffer[i + 1] == '=' || (buffer[i + 2] == '=' && buffer[i + 3] != '=')) |
︙ | ︙ |