Repository navigation
Tags
Tags
Reject malformed Base64 inputs and prevent buffer overrun when decodi… …ng. (#752) - `GTLRDecodeWebSafeBase64` allows unpadded strings, which previously let inputs with a 1-character final group (`length % 4 == 1`) reach the decode loop where the first output byte of each group is written unconditionally, overrunning the `NSMutableData` buffer by one byte and reading the C-string NUL terminator. - When `=` padding is present in optional-padding mode, total length must still be a multiple of 4 so partially padded or `=`-only strings are rejected rather than stripped into invalid or empty payloads. - Reject strings containing embedded NUL bytes instead of silently truncating at `strlen`, compute `outputLength` without `inputLength * 3` overflow on 32-bit targets, and exclude the string literal NUL terminator when populating `decodingTable`.
PreviousNext