X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcsftp%2Fsftp_util.c;h=b3f79d5a87d978f8f69267714e46960c69d1a719;hb=40f8443d8d3a6577336ee66d18e04d9ac4d956bb;hp=2e982d6d6b70a502cfb4f12e886ee03f6ff68d18;hpb=7fae3f3536ecdf9475a2ce3673ae29dcaa77fef8;p=silc.git diff --git a/lib/silcsftp/sftp_util.c b/lib/silcsftp/sftp_util.c index 2e982d6d..b3f79d5a 100644 --- a/lib/silcsftp/sftp_util.c +++ b/lib/silcsftp/sftp_util.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2001 Pekka Riikonen + Copyright (C) 2001 - 2002 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ */ /* $Id$ */ -#include "silcincludes.h" +#include "silc.h" #include "silcsftp.h" #include "sftp_util.h" @@ -133,7 +133,8 @@ SilcSFTPPacket silc_sftp_packet_decode(SilcBuffer packet, SilcBuffer silc_sftp_attr_encode(SilcSFTPAttributes attr) { SilcBuffer buffer; - int i, ret, len = 4; + int i, ret; + SilcUInt32 len = 4; if (attr->flags & SILC_SFTP_ATTR_SIZE) len += 8; @@ -152,10 +153,9 @@ SilcBuffer silc_sftp_attr_encode(SilcSFTPAttributes attr) } } - buffer = silc_buffer_alloc(len); + buffer = silc_buffer_alloc_size(len); if (!buffer) return NULL; - silc_buffer_pull_tail(buffer, SILC_BUFFER_END(buffer)); silc_buffer_format(buffer, SILC_STR_UI_INT(attr->flags),