Skip to content

Commit

Permalink
Fix cvs ignore base64 error value
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSampanis committed Oct 17, 2014
1 parent 535f984 commit 9e9fdc7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dissectors/ec_imap.c
Expand Up @@ -284,12 +284,15 @@ FUNC_DECODER(dissector_imap)

DEBUG_MSG("\tDissector_imap AUTHENTICATE PLAIN USER/PASS");

//SAFE_CALLOC(cred, strlen((const char*)ptr), sizeof(char));

/* password is encoded in base64 */
i = base64decode((const char *)ptr, &cred);
p = cred;
cred_end = cred+i;
if (p > cred_end) {
SAFE_FREE(cred);
dissect_wipe_session(PACKET, DISSECT_CODE(dissector_imap));
return NULL;
}
/* move to the username right after the first \0 */
while(*p && p!=cred_end) p++;
if (p!=cred_end) p++;
Expand Down

0 comments on commit 9e9fdc7

Please sign in to comment.