Opened 14 years ago

Last modified 13 years ago

#513 closed Defect (Fixed)

Block buffers are wrong sizes in NSDataAdditions initWithBase64EncodedString

Reported by: chris@… Owned by: timothy
Component: Chat Core (IRC) Version: 2.0 (Mac)
Severity: Blocker Keywords:
Cc:

Description

On line 26 of NSDataAdditions.m, the sizes of the inbuf and outbuf arrays are swapped. If you're decoding base 64, inbuf should have 4 elements, and outbuf should have 3. This code does not correctly decode base 64 in its current state...

basically, it reads:
unsigned char inbuf[3], outbuf[4];

instead, it should read:
unsigned char inbuf[4], outbuf[3];

Change History (0)

Note: See TracTickets for help on using tickets.