diff --git a/src/jrd/inf.cpp b/src/jrd/inf.cpp index 01541a84af..54361db67a 100644 --- a/src/jrd/inf.cpp +++ b/src/jrd/inf.cpp @@ -846,7 +846,7 @@ SCHAR *INF_put_item(SCHAR item, * **************************************/ - if (ptr + length + 4 >= end) { + if (ptr + length + 4 > end) { *ptr = gds_info_truncated; return NULL; } diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index 4dfdbb6281..3c06741340 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -1358,7 +1358,10 @@ void SVC_putc(SVC service, UCHAR ch) to store a read to eof, return the data that was read along with an indication that more is available. */ - info = INF_put_item(item, length, info + 3, info, end); + if (!(info = INF_put_item(item, length, info + 3, info, end))) { + THREAD_ENTER; + return 0; + } if (service->svc_flags & SVC_timeout) {