8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:43:02 +01:00

Backported CORE-6221: Incorrect (throw-based) allocFunc for zlib

This commit is contained in:
AlexPeshkoff 2020-01-10 13:59:43 +03:00
parent 0c14ba9d3d
commit d27a422c63
3 changed files with 10 additions and 2 deletions

View File

@ -87,7 +87,7 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
objs: $(OBJECTS) objs: $(OBJECTS)
$(LIBNAME): $(OBJECTS) $(LIBNAME): $(OBJECTS)
$(LIBTOOL) --mode=link --tag=CC gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) $(LIBTOOL) --mode=link --tag=CC gcc $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBNAME) install: $(LIBNAME)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)

View File

@ -6344,6 +6344,7 @@ static void authReceiveResponse(bool havePacket, ClntAuthBlock& cBlock, rem_port
break; break;
} }
cBlock.resetDataFromPlugin();
cBlock.storeDataForPlugin(d->cstr_length, d->cstr_address); cBlock.storeDataForPlugin(d->cstr_length, d->cstr_address);
HANDSHAKE_DEBUG(fprintf(stderr, "Cli: receiveResponse: authenticate(%s)\n", cBlock.plugins.name())); HANDSHAKE_DEBUG(fprintf(stderr, "Cli: receiveResponse: authenticate(%s)\n", cBlock.plugins.name()));
if (cBlock.plugins.plugin()->authenticate(&s, &cBlock) == IAuth::AUTH_FAILED) if (cBlock.plugins.plugin()->authenticate(&s, &cBlock) == IAuth::AUTH_FAILED)

View File

@ -1369,7 +1369,14 @@ namespace {
void* allocFunc(void*, uInt items, uInt size) void* allocFunc(void*, uInt items, uInt size)
{ {
return MemoryPool::globalAlloc(items * size ALLOC_ARGS); try
{
return MemoryPool::globalAlloc(items * size ALLOC_ARGS);
}
catch (const Firebird::Exception&)
{
return NULL;
}
} }
void freeFunc(void*, void* address) void freeFunc(void*, void* address)