]> granicus.if.org Git - neomutt/commitdiff
fix crash in eat_date()
authorMehdi Abaakouk <sileht@sileht.net>
Wed, 28 Nov 2018 12:07:45 +0000 (13:07 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 28 Nov 2018 12:41:29 +0000 (12:41 +0000)
pattern.c

index f9ede5917db8074e7d72488a62e53764dbcc3c2d..16a48a4ebb2898600f27faa7841679fe9ad44ab6 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -542,7 +542,7 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
 
     /* Reset the HMS unless we are relative matching using one of those
      * offsets. */
-    strtol(s->data + 1, &offset_type, 0);
+    strtol(buf.data + 1, &offset_type, 0);
     if (!(*offset_type && strchr("HMS", *offset_type)))
     {
       tm->tm_hour = 23;