mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #27201: libiax: fix out of bounds memory access
This commit is contained in:
@ -369,7 +369,7 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
|
||||
/* Don't mess with mini-frames */
|
||||
return;
|
||||
}
|
||||
if (fh->type > (int)sizeof(frames)/(int)sizeof(char *)) {
|
||||
if (fh->type >= (int)sizeof(frames)/(int)sizeof(char *)) {
|
||||
snprintf(class2, (int)sizeof(class2), "(%d?)", fh->type);
|
||||
clas = class2;
|
||||
} else {
|
||||
@ -386,7 +386,7 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
|
||||
subclass = iaxs[(int)fh->csub];
|
||||
}
|
||||
} else if (fh->type == AST_FRAME_CONTROL) {
|
||||
if (fh->csub > (int)sizeof(cmds)/(int)sizeof(char *)) {
|
||||
if (fh->csub >= (int)sizeof(cmds)/(int)sizeof(char *)) {
|
||||
snprintf(subclass2, (int)sizeof(subclass2), "(%d?)", fh->csub);
|
||||
subclass = subclass2;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user