NeoMutt  2025-09-05-43-g177ed6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
address.c File Reference
#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "mutt.h"
#include "protos.h"
+ Include dependency graph for address.c:

Go to the source code of this file.

Functions

static int log_disp_null (time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
 Discard log lines - Implements log_dispatcher_t -.
 
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 

Variables

bool StartupComplete = true
 

Function Documentation

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * data,
size_t size )

Definition at line 24 of file address.c.

25{
27 struct ConfigSet *cs = cs_new(16);
28 NeoMutt = neomutt_new(cs);
29 init_config(cs);
30 char file[] = "/tmp/mutt-fuzz";
31 FILE *fp = fopen(file, "wb");
32 if (!fp)
33 return -1;
34
35 fwrite(data, 1, size, fp);
36 fclose(fp);
37 fp = fopen(file, "rb");
38 if (!fp)
39 return -1;
40
41 struct Email *e = email_new();
42 struct Envelope *env = mutt_rfc822_read_header(fp, e, 0, 0);
43 mutt_parse_part(fp, e->body);
44 email_free(&e);
45 mutt_env_free(&env);
46 fclose(fp);
48 cs_free(&cs);
49 return 0;
50}
void cs_free(struct ConfigSet **ptr)
Free a Config Set.
Definition set.c:141
struct ConfigSet * cs_new(size_t size)
Create a new Config Set.
Definition set.c:127
struct Email * email_new(void)
Create a new Email.
Definition email.c:77
void email_free(struct Email **ptr)
Free an Email.
Definition email.c:46
void mutt_parse_part(FILE *fp, struct Body *b)
Parse a MIME part.
Definition parse.c:1821
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
Parses an RFC822 header.
Definition parse.c:1204
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
Definition envelope.c:126
static int log_disp_null(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Discard log lines - Implements log_dispatcher_t -.
Definition address.c:18
int log_dispatcher_t MuttLogger
void init_config(struct ConfigSet *cs)
Initialise the config system.
struct NeoMutt * neomutt_new(struct ConfigSet *cs)
Create the main NeoMutt object.
Definition neomutt.c:50
void neomutt_free(struct NeoMutt **ptr)
Free a NeoMutt.
Definition neomutt.c:86
Container for lots of config items.
Definition set.h:248
The envelope/body of an email.
Definition email.h:39
struct Body * body
List of MIME parts.
Definition email.h:69
The header of an Email.
Definition envelope.h:57
Container for Accounts, Notifications.
Definition neomutt.h:43
+ Here is the call graph for this function:

Variable Documentation

◆ StartupComplete

bool StartupComplete = true

Definition at line 13 of file address.c.