summaryrefslogtreecommitdiff
path: root/roaming_common.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-12-19 10:52:50 +1100
committerDamien Miller <djm@mindrot.org>2011-12-19 10:52:50 +1100
commit8ed4de8f1dcebddd7edc0dd3c10f1cb947d831eb (patch)
tree3c9442e4dfcae3662f42cb53cccc7e45f98c0897 /roaming_common.c
parent913ddff40d090751d50be2339cd859505b24f65b (diff)
- djm@cvs.openbsd.org 2011/12/07 05:44:38
[auth2.c dh.c packet.c roaming.h roaming_client.c roaming_common.c] fix some harmless and/or unreachable int overflows; reported Xi Wang, ok markus@
Diffstat (limited to 'roaming_common.c')
-rw-r--r--roaming_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/roaming_common.c b/roaming_common.c
index 9adbe56fc..8d0b6054a 100644
--- a/roaming_common.c
+++ b/roaming_common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: roaming_common.c,v 1.8 2010/01/12 00:59:29 djm Exp $ */ 1/* $OpenBSD: roaming_common.c,v 1.9 2011/12/07 05:44:38 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB 3 * Copyright (c) 2004-2009 AppGate Network Security AB
4 * 4 *
@@ -75,6 +75,8 @@ get_recv_buf_size()
75void 75void
76set_out_buffer_size(size_t size) 76set_out_buffer_size(size_t size)
77{ 77{
78 if (size == 0 || size > MAX_ROAMBUF)
79 fatal("%s: bad buffer size %lu", __func__, (u_long)size);
78 /* 80 /*
79 * The buffer size can only be set once and the buffer will live 81 * The buffer size can only be set once and the buffer will live
80 * as long as the session lives. 82 * as long as the session lives.