aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-03 17:23:41 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-03 17:23:41 +0200
commit10a011b94ebd2b3049aa255abff91c0628330112 (patch)
tree63d0019bd3336c2d0b8ab57c5c02d514a0ff8fde
parent12d38b8a1307a6df070f0f62a1378faa58a5d043 (diff)
downloadmblaze-10a011b94ebd2b3049aa255abff91c0628330112.tar.gz
blaze822: blaze822_addr: use memcpy instead of strcpy, we know the length
-rw-r--r--blaze822.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/blaze822.c b/blaze822.c
index 1154e3d..3867c76 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -187,7 +187,8 @@ blaze822_addr(char *s, char **dispo, char **addro)
*c-- = 0;
while (c > disp && iswsp(*c))
*c-- = 0;
- strcpy(addr, disp);
+ c++;
+ memcpy(addr, disp, (c - disp) + 1);
c = disp;
*c = 0;
}
@@ -216,7 +217,8 @@ blaze822_addr(char *s, char **dispo, char **addro)
if (*disp && !*addr && strchr(disp, '@')) {
// just mail address was given
- strcpy(addr, disp);
+ c++;
+ memcpy(addr, disp, (c - disp) + 1);
*disp = 0;
}