Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
98 | magnus | 1 | From: Nathaniel <me@nathanielbennett.com> |
2 | Date: Tue, 8 Jun 2021 20:02:52 -0400 |
||
3 | Subject: Fixed 'reverse' macro modifier |
||
4 | Origin: https://github.com/shevek/libspf2/commit/f06fef6cede4c4cb42f2c617496e6041782d7070 |
||
5 | |||
6 | --- |
||
7 | src/libspf2/spf_expand.c | 14 +++++++------- |
||
8 | 1 file changed, 7 insertions(+), 7 deletions(-) |
||
9 | |||
10 | diff --git a/src/libspf2/spf_expand.c b/src/libspf2/spf_expand.c |
||
11 | index 25689da11e84..f93005d26f44 100644 |
||
12 | --- a/src/libspf2/spf_expand.c |
||
13 | +++ b/src/libspf2/spf_expand.c |
||
14 | @@ -86,7 +86,7 @@ SPF_record_expand_data(SPF_server_t *spf_server, |
||
15 | { |
||
16 | SPF_data_t *d, *data_end; |
||
17 | |||
18 | - size_t len; |
||
19 | + size_t len, label_len; |
||
20 | const char *p_err; // XXX Check this value, when returned. |
||
21 | char *p, *p_end; |
||
22 | const char *p_read; |
||
23 | @@ -300,9 +300,9 @@ top: |
||
24 | if ( SPF_delim_valid(d, *p_read) ) { |
||
25 | /* Subtract 1 because p_read points to delim, and |
||
26 | * p_read_end points to the following delim. */ |
||
27 | - len = p_read_end - p_read - 1; |
||
28 | - memcpy( p_write, p_read + 1, len ); |
||
29 | - p_write += len; |
||
30 | + label_len = p_read_end - p_read - 1; |
||
31 | + memcpy( p_write, p_read + 1, label_len ); |
||
32 | + p_write += label_len; |
||
33 | *p_write++ = '.'; |
||
34 | |||
35 | p_read_end = p_read; |
||
36 | @@ -314,9 +314,9 @@ top: |
||
37 | * string. p_read_end might also point there if the string |
||
38 | * starts with a delimiter. */ |
||
39 | if (p_read_end >= p_read) { |
||
40 | - len = p_read_end - p_read - 1; |
||
41 | - memcpy( p_write, p_read + 1, len ); |
||
42 | - p_write += len; |
||
43 | + label_len = p_read_end - p_read - 1; |
||
44 | + memcpy( p_write, p_read + 1, label_len ); |
||
45 | + p_write += label_len; |
||
46 | *p_write++ = '.'; |
||
47 | } |
||
48 | |||
49 | -- |
||
50 | 2.20.1 |
||
51 |