summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-05-06 04:08:42 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-05-06 04:08:42 +0000
commit37f57e6cf35160d10516917cf9440f329eec0f61 (patch)
tree86b85cefec94e06a44f39debe26b7eefa173fb83
parent46c9befa6d88c42a7ef88f5f1828c763d6a77d92 (diff)
Don't overflow on long mailto:-tags.
-rw-r--r--gnu/usr.bin/lynx/src/LYMail.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/lynx/src/LYMail.c b/gnu/usr.bin/lynx/src/LYMail.c
index b7acce45f39..e7e79b866ba 100644
--- a/gnu/usr.bin/lynx/src/LYMail.c
+++ b/gnu/usr.bin/lynx/src/LYMail.c
@@ -1216,8 +1216,11 @@ PUBLIC void reply_by_mail ARGS3(
* Put the To: line in the header.
*/
#ifndef DOSPATH
- sprintf(buf, "To: %s\n", address);
- StrAllocCopy(header, buf);
+ asprintf(&header, "To: %s\n", address);
+ if (!header) {
+ fprintf(stderr, "Out of memory, you loose!\n");
+ exit(1);
+ }
#endif
/*