aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_sms.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2008-06-16 21:55:37 +0000
committerGerald Combs <gerald@wireshark.org>2008-06-16 21:55:37 +0000
commita40cf08ddacadc996a4afef9270ddd99bce5366b (patch)
tree834a3f2e6a3447d28a3257384335713b4975c8d4 /epan/dissectors/packet-gsm_sms.h
parent5ee742503389b0dce28a9cb939c9f863178c7225 (diff)
Fix an off-by-one bug reported by David Ceccanti, as suggested by Guy at
http://www.wireshark.org/lists/wireshark-users/200806/msg00077.html. Add a comment about the usage of gsm_sms_char_7bit_unpack(). svn path=/trunk/; revision=25462
Diffstat (limited to 'epan/dissectors/packet-gsm_sms.h')
-rw-r--r--epan/dissectors/packet-gsm_sms.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-gsm_sms.h b/epan/dissectors/packet-gsm_sms.h
index 2a652b52b9..33c6737215 100644
--- a/epan/dissectors/packet-gsm_sms.h
+++ b/epan/dissectors/packet-gsm_sms.h
@@ -24,6 +24,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* Convert a 7-bit GSM SMS packed string into an unpacked string.
+ *
+ * @param offset Bit offset of the start of the string.
+ * @param in_length Length of the packed string in bytes.
+ * @param out_length Length of the output string in bytes.
+ * @param input The string to unpack
+ * @param output The buffer for the output string. This buffer must
+ * be pre-allocated and be at least out_length characters
+ * long, or out_length + 1 if you're planning on adding a
+ * terminating '\0'.
+ * @return The number of unpacked characters.
+ */
+
extern int gsm_sms_char_7bit_unpack(unsigned int offset, unsigned int in_length, unsigned int out_length,
const guint8 *input, unsigned char *output);
extern void gsm_sms_char_ascii_decode(unsigned char* dest, const unsigned char* src, int len);