aboutsummaryrefslogtreecommitdiffstats
path: root/epan/media_params.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-22 17:53:10 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-23 00:53:46 +0000
commit0b3a96222b39ea4df1fdc899a950c50ec56a1077 (patch)
treed0069e7f461adb89cfc27a5fe6f4df7d00eabd06 /epan/media_params.h
parent943a9ede85962f07fc75b64e2ed12bdc54a911bb (diff)
Handle quoted-pairs in quoted-strings correctly.
Backslash, in a quoted-string, escapes quotes (and any other characters, although the only ones that *need* escaping are a double-quote and a backslash). This means that the value of a parameter isn't just the raw characters from the parameters string; for a quoted string, it needs to be un-escaped, and for a *non*-quoted string, it has to stop at the first non-token character (you can put comments in). So ws_find_media_type_parameter() must return an allocated string with the actual value. Get rid of index_of_char(); it doesn't do anything that strchr() does. Change-Id: I36328ea71c28fe6ac4918a8e73c281a25f6be844 Reviewed-on: https://code.wireshark.org/review/17251 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/media_params.h')
-rw-r--r--epan/media_params.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/media_params.h b/epan/media_params.h
index 0be153cc66..83e84a1d68 100644
--- a/epan/media_params.h
+++ b/epan/media_params.h
@@ -1,5 +1,5 @@
/* media_params.h
- * Routines for parsing media type parameters
+ * Routines for parsing media type parameters as per RFC 822 and RFC 2045
* Copyright 2004, Anders Broman.
* Copyright 2004, Olivier Biot.
*
@@ -37,7 +37,7 @@ extern "C" {
#endif /* __cplusplus */
WS_DLL_PUBLIC char *
-ws_find_media_type_parameter(const char *parameters, const char *key, int *retlen);
+ws_find_media_type_parameter(const char *parameters, const char *key);
#ifdef __cplusplus
}