From 37f57e6cf35160d10516917cf9440f329eec0f61 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Wed, 6 May 1998 04:08:42 +0000 Subject: Don't overflow on long mailto:-tags. --- gnu/usr.bin/lynx/src/LYMail.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/usr.bin') 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 /* -- cgit v1.2.3