NeoMutt
2025-12-11-1059-g2f5469
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
date.c
Go to the documentation of this file.
1
#include "config.h"
2
#include <signal.h>
3
#include <stdbool.h>
4
#include <stdint.h>
5
#include <time.h>
6
#include "
mutt/lib.h
"
7
8
bool
StartupComplete
=
true
;
9
10
int
LLVMFuzzerTestOneInput
(
const
uint8_t *data,
size_t
size)
11
{
12
if
(size > 512)
13
return
-1;
14
15
struct
Tz
tz = { 0 };
16
char
*str =
mutt_strn_dup
((
const
char
*) data, size);
17
time_t t =
mutt_date_parse_date
(str, &tz);
18
(void) t;
19
FREE
(&str);
20
return
0;
21
}
StartupComplete
bool StartupComplete
Definition
address.c:11
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
Definition
date.c:10
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:92
mutt_date_parse_date
time_t mutt_date_parse_date(const char *s, struct Tz *tz_out)
Parse a date string in RFC822 format.
Definition
date.c:719
lib.h
Convenience wrapper for the library headers.
mutt_strn_dup
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
Definition
string.c:384
Tz
List of recognised Timezones.
Definition
date.h:53