Coverage Report

Created: 2026-04-27 06:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/pigeonhole/src/lib-sieve/plugins/special-use/ext-special-use-common.c
Line
Count
Source
1
/* Copyright (c) 2019 Pigeonhole authors, see the included COPYING file */
2
3
#include "lib.h"
4
#include "imap-arg.h"
5
6
#include "ext-special-use-common.h"
7
8
bool ext_special_use_flag_valid(const char *flag)
9
0
{
10
0
  const char *p = flag;
11
12
  /* RFC 6154, Section 6:
13
14
     use-attr        =  "\All" / "\Archive" / "\Drafts" / "\Flagged" /
15
                        "\Junk" / "\Sent" / "\Trash" / use-attr-ext
16
     use-attr-ext    =  "\" atom
17
   */
18
19
  /* "\" */
20
0
  if (*p != '\\')
21
0
    return FALSE;
22
0
  p++;
23
24
  /* atom */
25
0
  for (; *p != '\0'; p++) {
26
0
    if (!IS_ATOM_CHAR(*p))
27
0
      return FALSE;
28
0
  }
29
30
0
  return TRUE;
31
0
}