From 470fe54cee6581643ce2dbf21f09b4dac7be5103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 16 Apr 2003 16:17:49 +0000 Subject: [PATCH] do strdup again, we desupport ultrix git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12047 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/otp/otp_challenge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/otp/otp_challenge.c b/lib/otp/otp_challenge.c index 3310e8177..9a8d64781 100644 --- a/lib/otp/otp_challenge.c +++ b/lib/otp/otp_challenge.c @@ -46,12 +46,11 @@ otp_challenge (OtpContext *ctx, char *user, char *str, size_t len) ctx->challengep = 0; ctx->err = NULL; - ctx->user = malloc(strlen(user) + 1); + ctx->user = strdup(user); if (ctx->user == NULL) { ctx->err = "Out of memory"; return -1; } - strcpy(ctx->user, user); dbm = otp_db_open (); if (dbm == NULL) { ctx->err = "Cannot open database";