From 475913287b2345c87c4701b3f2c96f6f5fd084d7 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Wed, 27 Aug 2008 08:05:29 +0000 Subject: [PATCH] Fixed CORE-2055: BOF in fbclient --- src/remote/remote.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/remote/remote.cpp b/src/remote/remote.cpp index 7941b24b0b..f46ec496d0 100644 --- a/src/remote/remote.cpp +++ b/src/remote/remote.cpp @@ -602,6 +602,10 @@ void REMOTE_save_status_strings( ISC_STATUS* vector) if (status != isc_arg_cstring) l = strlen(p) + 1; + // if string too long, truncate it + if (l > ATTACH_FAILURE_SPACE / 4) + l = ATTACH_FAILURE_SPACE / 4; + /* If there isn't any more room in the buffer, start at the beginning again */