]> diplodocus.org Git - nmh/blob - sbr/unquote.h
Fix invalid pointer arithmetic.
[nmh] / sbr / unquote.h
1 /* unquote.h -- Handle quote removal and quoted-pair strings on
2 * RFC 2822-5322 atoms.
3 *
4 * This code is Copyright (c) 2017, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
7 */
8
9 /* Remove quotes and quoted-pair sequences from RFC-5322 atoms.
10 *
11 * Currently the actual algorithm is simpler than it technically should
12 * be: any quotes are simply eaten, unless they're preceded by the escape
13 * character (\). This seems to be sufficient for our needs for now.
14 *
15 * Arguments:
16 *
17 * input - The input string
18 * output - The output string; is assumed to have at least as much
19 * room as the input string. At worst the output string
20 * will be the same size as the input string; it might be
21 * smaller. */
22 void unquote_string(const char *input, char *output);