diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-05-14 22:46:44 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-05-14 22:47:28 +0200 |
commit | 124518ae5fba9e352a9cf8a8d7c1a8160475d10b (patch) | |
tree | 12a8d57a0de3e20bc28bfae550631bce49b9723e /sink.c | |
parent | b8f5a610eac4a90fc5e8f22c65184f7797abf7bb (diff) | |
download | fetchmail-124518ae5fba9e352a9cf8a8d7c1a8160475d10b.tar.gz fetchmail-124518ae5fba9e352a9cf8a8d7c1a8160475d10b.tar.bz2 fetchmail-124518ae5fba9e352a9cf8a8d7c1a8160475d10b.zip |
In-depth robustness.
Reported by: clang static analyzer (clang-8)
Diffstat (limited to 'sink.c')
-rw-r--r-- | sink.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1189,14 +1189,14 @@ static int open_mda_sink(struct query *ctl, struct msgblk *msg, ** the worst case (end of string) sp[1] == '\0' */ if (sp[1] == 's' || sp[1] == 'T') { *dp++ = '\''; - strcpy(dp, names); + if (names) strcpy(dp, names); dp += nameslen; *dp++ = '\''; sp++; /* position sp over [sT] */ dp--; /* adjust dp */ } else if (sp[1] == 'F') { *dp++ = '\''; - strcpy(dp, from); + if (from) strcpy(dp, from); dp += fromlen; *dp++ = '\''; sp++; /* position sp over F */ |