Summary: | ASTERISK-06445: [need disclaimer] libiax2 crashes in iax2-parser.c iax_showframe() | ||
Reporter: | carsten (carsten) | Labels: | |
Date Opened: | 2006-02-28 22:34:20.000-0600 | Date Closed: | 2011-06-07 14:00:26 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_iax2 |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) show_frame_segfault.patch | |
Description: | This may be the same as Bug 4974, but I don't know how to add there. When communicating with teliax I sometimes get control frames that have fh->csub set to 8. Is this invalid or a new command? Any way, to fix the segfault the following code bit needs to be changed: Change if (fh->csub > sizeof(cmds)/sizeof(char *)) to: if (fh->csub >= sizeof(cmds)/sizeof(char *)) Old code: ------------------------------------------------------------------------ else if (fh->type == AST_FRAME_CONTROL) { if (fh->csub > sizeof(cmds)/sizeof(char *)) { snprintf(subclass2, sizeof(subclass2), "(%d?)", fh->csub); subclass = subclass2; } else { subclass = cmds[(int)fh->csub]; } } ------------------------------------------------------ This one is wrong too: if (fh->type > sizeof(frames)/sizeof(char *)) | ||
Comments: | By: Tilghman Lesher (tilghman) 2006-02-28 22:49:51.000-0600 What exactly are you running with libiax2? By: carsten (carsten) 2006-02-28 22:50:08.000-0600 Looks like there are 4 more cmds that should be added as well: const char *cmds[] = { "(0?)", "HANGUP ", "RING ", "RINGING", "ANSWER ", "BUSY ", "TKOFFHK ", "OFFHOOK", "CONGESTION", "FLASH", "WINK", "OPTION" }; By: carsten (carsten) 2006-02-28 22:51:47.000-0600 I am running my own client with teliax as PSTN provider. By: Serge Vecher (serge-v) 2006-05-03 10:51:20 carsten: can you please put all your changes into a single patch file, please? Thanks. By: carsten (carsten) 2006-05-03 11:33:50 Here it is. It's a bit old by now, but I hope it still works. By: Joshua C. Colp (jcolp) 2006-05-08 09:21:02 If you would really like this in, you'll need to get a disclaimer on file. Just as a note though - libiax2 isn't maintained really anymore which is why this probably came up for you. By: carsten (carsten) 2006-05-09 11:04:16 Why is libiax2 not maintained any more? Is there an alternative that I should be using instead? How do I get this discalimer on file? Thank you. By: Serge Vecher (serge-v) 2006-05-09 11:07:51 Disclaimers: http://bugs.digium.com/main_page.php, bottom of the page. Please confirm when done. Thanks. By: Joshua C. Colp (jcolp) 2006-05-17 19:17:18 Most people actually end up using iaxclient as it's maintained more. I didn't even know libiax2 was in SVN, or that I had access to it... ha! If you still want me to put this in I will though, just get a disclaimer on record. By: Joshua C. Colp (jcolp) 2006-05-22 10:55:38 Closing this since we don't have a disclaimer on file yet, if you do end up putting one in I'll be sure to get this in ASAP. Peace! |