aboutsummaryrefslogtreecommitdiffstats
path: root/epan/range.h
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-10-29 22:09:31 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-10-29 22:09:31 +0000
commit6eba069093ef665b3fa5f179dd315ab89916c4e7 (patch)
tree03ef3c16c38dc1cbbbfe2b3a95f8544a1836b967 /epan/range.h
parente21ca351167349c9ba531bee03ba99eca889a408 (diff)
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4768 :
Return an error if the user specifies a value in a range in excess of the range-specified maximum. Except when reading in preferences files which might have ranges that exceed the maximum (because we didn't use to check): in that case silently lower the out-of-range values. svn path=/trunk/; revision=34698
Diffstat (limited to 'epan/range.h')
-rw-r--r--epan/range.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/range.h b/epan/range.h
index 26ecc5e42a..16297b03b3 100644
--- a/epan/range.h
+++ b/epan/range.h
@@ -58,7 +58,7 @@ typedef enum {
CVT_NO_ERROR,
CVT_SYNTAX_ERROR,
CVT_NUMBER_TOO_BIG
-} convert_ret_t;
+} convert_ret_t;
extern range_t *range_empty(void);
@@ -69,10 +69,10 @@ extern range_t *range_empty(void);
* low and high values with the number of ranges being range->nranges.
* After having called this function, the function value_is_in_range()
* determines whether a given number is within the range or not.<BR>
- * In case of a single number, we make a range where low is equal to high.
+ * In case of a single number, we make a range where low is equal to high.
* We take care on wrongly entered ranges; opposite order will be taken
* care of.
- *
+ *
* The following syntax is accepted :
*
* 1-20,30-40 Range from 1 to 20, and packets 30 to 40
@@ -83,11 +83,14 @@ extern range_t *range_empty(void);
* @param range the range
* @param es points to the string to be converted.
* @param max_value' specifies the maximum value in a range.
- * @return
+ * @return
*/
extern convert_ret_t range_convert_str(range_t **range, const gchar *es,
guint32 max_value);
+extern convert_ret_t range_convert_str_work(range_t **range, const gchar *es,
+ guint32 max_value, gboolean err_on_max);
+
/** This function returns TRUE if a given value is within one of the ranges
* stored in the ranges array.
* @param range the range
@@ -110,8 +113,8 @@ extern gboolean ranges_are_equal(range_t *a, range_t *b);
*/
extern void range_foreach(range_t *range, void (*callback)(guint32 val));
-/**
- * This function converts a range_t to a (ep_alloc()-allocated) string.
+/**
+ * This function converts a range_t to a (ep_alloc()-allocated) string.
*/
extern char *range_convert_range(range_t *range);