diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2011-05-04 12:10:59 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2011-05-04 12:10:59 +0200 |
commit | 38c2bcf5da548b953063fd651ec3d0ebb52c73f8 (patch) | |
tree | 68bf96e8748639a7db793c3b28bf9cdc8d2a4edb | |
parent | 646f36e1c1369fd65c0d641cae48fa4425613462 (diff) | |
download | fetchmail-38c2bcf5da548b953063fd651ec3d0ebb52c73f8.tar.gz fetchmail-38c2bcf5da548b953063fd651ec3d0ebb52c73f8.tar.bz2 fetchmail-38c2bcf5da548b953063fd651ec3d0ebb52c73f8.zip |
Make macro expansions safer for VALID_ADDRESS and RBUF_WRITE.
-rw-r--r-- | transact.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -201,7 +201,7 @@ static void find_server_names(const char *hdr, * are not uncommon. So now we just check that the following token is * not itself an email address. */ -#define VALID_ADDRESS(a) !strchr(a, '@') +#define VALID_ADDRESS(a) (!strchr((a), '@')) static char *parse_received(struct query *ctl, char *bufp) /* try to extract real address from the Received line */ @@ -217,7 +217,7 @@ static char *parse_received(struct query *ctl, char *bufp) static char rbuf[HOSTLEN + USERNAMELEN + 4]; struct addrinfo *ai0; -#define RBUF_WRITE(value) if (tp < rbuf+sizeof(rbuf)-1) *tp++=value +#define RBUF_WRITE(value) do { if (tp < rbuf+sizeof(rbuf)-1) *tp++=(value); } while(0) /* * Try to extract the real envelope addressee. We look here |