Array Index Out of Bound Bug Issue
Opened this issue · 0 comments
piyapan039285 commented
I have noticed that array inbuf
in method (id) initWithBase64EncodedString:(NSString *) string
of file NSData+Base64.m
is decleared with unsigned char inbuf[3]
. However, code in line 79 uses out-of-bound array index:
outbuf [2] = ( ( inbuf[2] & 0x03 ) << 6 ) | ( inbuf[3] & 0x3F ); //inbuf[3] is out-of-bound
I think array inbuf
should be declared as unsigned char inbuf[4]
to prevent array out-of-bound access violation.