In NSData+Base64.m, in the initWithBase64EncodedString: method, the inbuf array is declared with size 3, yet it is indexed with indexes 0 thru 3, which is a buffer overflow. Curiously, the outbuf array is declared with size 4, yet is indexed with indexes 0 thru 2. Perhaps their sizes are switched.