summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sftp-server.c b/sftp-server.c
index e58aa59c8..e842341cb 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-server.c,v 1.56 2006/03/25 13:17:02 djm Exp $ */ 1/* $OpenBSD: sftp-server.c,v 1.57 2006/03/30 09:58:16 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
4 * 4 *
@@ -23,7 +23,6 @@
23 23
24#include "buffer.h" 24#include "buffer.h"
25#include "bufaux.h" 25#include "bufaux.h"
26#include "getput.h"
27#include "log.h" 26#include "log.h"
28#include "xmalloc.h" 27#include "xmalloc.h"
29#include "misc.h" 28#include "misc.h"
@@ -172,7 +171,7 @@ handle_to_string(int handle, char **stringp, int *hlenp)
172 if (stringp == NULL || hlenp == NULL) 171 if (stringp == NULL || hlenp == NULL)
173 return -1; 172 return -1;
174 *stringp = xmalloc(sizeof(int32_t)); 173 *stringp = xmalloc(sizeof(int32_t));
175 PUT_32BIT(*stringp, handle); 174 put_u32(*stringp, handle);
176 *hlenp = sizeof(int32_t); 175 *hlenp = sizeof(int32_t);
177 return 0; 176 return 0;
178} 177}
@@ -184,7 +183,7 @@ handle_from_string(const char *handle, u_int hlen)
184 183
185 if (hlen != sizeof(int32_t)) 184 if (hlen != sizeof(int32_t))
186 return -1; 185 return -1;
187 val = GET_32BIT(handle); 186 val = get_u32(handle);
188 if (handle_is_ok(val, HANDLE_FILE) || 187 if (handle_is_ok(val, HANDLE_FILE) ||
189 handle_is_ok(val, HANDLE_DIR)) 188 handle_is_ok(val, HANDLE_DIR))
190 return val; 189 return val;
@@ -950,7 +949,7 @@ process(void)
950 if (buf_len < 5) 949 if (buf_len < 5)
951 return; /* Incomplete message. */ 950 return; /* Incomplete message. */
952 cp = buffer_ptr(&iqueue); 951 cp = buffer_ptr(&iqueue);
953 msg_len = GET_32BIT(cp); 952 msg_len = get_u32(cp);
954 if (msg_len > SFTP_MAX_MSG_LENGTH) { 953 if (msg_len > SFTP_MAX_MSG_LENGTH) {
955 error("bad message "); 954 error("bad message ");
956 exit(11); 955 exit(11);