Bug in wsp_server_method_states.def
"Paul Keogh" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
I think this code is wrong. /* * The Siemens S35 adds an extra NUL character to the end * of the request body which may not work with certain cgi * scripts. It is removed here by truncating the length. */ req_body_size = octstr_len(pdu->u.Post.data); if(octstr_get_char(pdu->u.Post.data,(req_body_size - 1)) == 0) octstr_truncate(pdu->u.Post.data,(req_body_size - 1)); I posted in an MMS message where the last byte of the encoding was 0. This code truncated the last byte and corrupted the MMS message. I suggest that "certain cgi scripts" be made more robust rather than hacking bytes out of the lower layers.