From 665a503692cb795166df535d4aa9e896676d04c1 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sat, 3 Jan 1998 20:30:25 +0000 Subject: [PATCH] unsigned git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4253 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/krb4.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/appl/ftp/ftp/krb4.c b/appl/ftp/ftp/krb4.c index 7727458e1..133435e1c 100644 --- a/appl/ftp/ftp/krb4.c +++ b/appl/ftp/ftp/krb4.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan + * Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -111,7 +111,7 @@ sec_prot_internal(int level) { int ret; char *p; - int s = 1048576; + unsigned int s = 1048576; int old_verbose = verbose; verbose = 0; @@ -122,7 +122,7 @@ sec_prot_internal(int level) } if(level){ - ret = command("PBSZ %d", s); + ret = command("PBSZ %u", s); if(ret != COMPLETE){ printf("Failed to set protection buffer size.\n"); return -1; @@ -130,12 +130,10 @@ sec_prot_internal(int level) auth_pbsz = s; p = strstr(reply_string, "PBSZ="); if(p) - sscanf(p, "PBSZ=%d", &s); + sscanf(p, "PBSZ=%u", &s); if(s < auth_pbsz) auth_pbsz = s; - if(data_buffer) - free(data_buffer); - data_buffer = malloc(auth_pbsz); + data_buffer = realloc(data_buffer, auth_pbsz); } verbose = old_verbose; ret = command("PROT %c", level["CSEP"]); /* XXX :-) */