mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-25 03:12:10 +00:00
- djm@cvs.openbsd.org 2010/02/02 22:49:34
[bufaux.c] make buffer_get_string_ret() really non-fatal in all cases (it was using buffer_get_int(), which could fatal() on buffer empty); ok markus dtucker
This commit is contained in:
parent
1d2bfc4118
commit
17751bcab2
@ -1,3 +1,11 @@
|
||||
20100212
|
||||
- (djm) OpenBSD CVS Sync
|
||||
- djm@cvs.openbsd.org 2010/02/02 22:49:34
|
||||
[bufaux.c]
|
||||
make buffer_get_string_ret() really non-fatal in all cases (it was
|
||||
using buffer_get_int(), which could fatal() on buffer empty);
|
||||
ok markus dtucker
|
||||
|
||||
20100210
|
||||
- (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
|
||||
getseuserbyname; patch from calebcase AT gmail.com via
|
||||
|
7
bufaux.c
7
bufaux.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bufaux.c,v 1.47 2010/01/12 01:36:08 djm Exp $ */
|
||||
/* $OpenBSD: bufaux.c,v 1.48 2010/02/02 22:49:34 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -166,7 +166,10 @@ buffer_get_string_ret(Buffer *buffer, u_int *length_ptr)
|
||||
u_int len;
|
||||
|
||||
/* Get the length. */
|
||||
len = buffer_get_int(buffer);
|
||||
if (buffer_get_int_ret(&len, buffer) != 0) {
|
||||
error("buffer_get_string_ret: cannot extract length");
|
||||
return (NULL);
|
||||
}
|
||||
if (len > 256 * 1024) {
|
||||
error("buffer_get_string_ret: bad string length %u", len);
|
||||
return (NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user