]> git.llucax.com Git - software/mutt-debian.git/blobdiff - score.c
upstream/608706-fix-spelling-errors.patch: to fix some spelling errors (Closes: 608706)
[software/mutt-debian.git] / score.c
diff --git a/score.c b/score.c
index 5e8dfe190040080161b2c8f666db6c62f2d45f3d..b8a1f6cd604590edeb27bf1d0d59a34214628638 100644 (file)
--- a/score.c
+++ b/score.c
@@ -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;
 }