If the prompt to reenter a voicemail password timed out, it

resulted in the password not being saved, even if the input matched
what you gave when first prompted to enter a new password. This is
because the return value of ast_readstring was checked, but not checked
properly.

This bug was discovered by Jared Smith during an Asterisk training course.
Thanks for reporting it!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2008-11-14 15:18:59 +00:00
parent bc208d63c2
commit b753654cbd

View File

@@ -6847,7 +6847,7 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct
if (cmd < 0)
break;
if ((cmd = ast_readstring(chan,newpassword2 + strlen(newpassword2),sizeof(newpassword2)-1,2000,10000,"#"))) {
if ((cmd = ast_readstring(chan,newpassword2 + strlen(newpassword2),sizeof(newpassword2)-1,2000,10000,"#")) < 0) {
break;
}
}