do strdup again, we desupport ultrix
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12047 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user