summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/special-vars.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/special-vars.c b/src/core/special-vars.c
index e131b0ed..33d9cd55 100644
--- a/src/core/special-vars.c
+++ b/src/core/special-vars.c
@@ -33,6 +33,8 @@
#define isarg(c) \
(i_isdigit(c) || (c) == '*' || (c) == '~' || (c) == '-')
+#define ALIGN_MAX 222488
+
static SPECIAL_HISTORY_FUNC history_func = NULL;
static char *get_argument(char **cmd, char **arglist)
@@ -300,6 +302,10 @@ static int get_alignment_args(char **data, int *align, int *flags, char *pad)
if (!parse_uint(str, &endptr, 10, &align_)) {
return FALSE;
}
+ /* alignment larger than supported */
+ if (align_ > ALIGN_MAX) {
+ return FALSE;
+ }
str = endptr;
*align = align_;