X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..d1b23f9d0c0856da1d869c58da0f092e4c73ce89:/score.c?ds=sidebyside diff --git a/score.c b/score.c index 79ce762..b8a1f6c 100644 --- a/score.c +++ b/score.c @@ -34,7 +34,7 @@ typedef struct score_t struct score_t *next; } SCORE; -SCORE *Score = NULL; +static SCORE *Score = NULL; void mutt_check_rescore (CONTEXT *ctx) { @@ -116,7 +116,12 @@ int mutt_parse_score (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) ptr->exact = 1; pc++; } - ptr->val = atoi (pc); + if (mutt_atoi (pc, &ptr->val) < 0) + { + FREE (&pattern); + strfcpy (err->data, _("Error: score: invalid number"), err->dsize); + return (-1); + } set_option (OPTNEEDRESCORE); return 0; }