[Libreoffice-commits] core.git: 2 commits - basic/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Sun Aug 23 08:58:00 PDT 2015
basic/source/classes/image.cxx | 14 -
vcl/workben/fftester.cxx | 526 ++++++++++++++++++++---------------------
2 files changed, 280 insertions(+), 260 deletions(-)
New commits:
commit de26ef857bf3b39a02192289a374605ca9491721
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 23 12:52:52 2015 +0100
coverity#1242865 Untrusted loop bound
Change-Id: I9c6f821f7bd1e9bd3eb8f47e269e62a792523f1a
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index ef468dc..703dbd4 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -241,6 +241,17 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
break;
}
case B_SBXOBJECTS:
+ {
+ //assuming an empty string with just the lead 32bit/16bit len indicator
+ const size_t nMinStringSize = (eCharSet == RTL_TEXTENCODING_UNICODE) ? 4 : 2;
+ const size_t nMinRecordSize = nMinStringSize + sizeof(sal_Int16);
+ const size_t nMaxRecords = r.remainingSize() / nMinRecordSize;
+ if (nCount > nMinRecordSize)
+ {
+ SAL_WARN("basic", "Parsing error: " << nMaxRecords <<
+ " max possible entries, but " << nCount << " claimed, truncating");
+ nCount = nMaxRecords;
+ }
// User defined types
for (sal_uInt16 i = 0; i < nCount; i++)
@@ -319,9 +330,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
AddType(pType);
}
-
break;
-
+ }
case B_MODEND:
goto done;
default:
commit ca09871bc0c2672370d23c66148afe25006962f8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 23 10:31:15 2015 +0100
coverity#1317301 Uncaught exception
Change-Id: I580c1c873b440d5230a0c9e6a2a2af5d5d8c0e0e
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index cb41af9..b50df80 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -76,305 +76,315 @@ unsigned int persist_cnt;
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
int ret = -1;
-
- if (argc < 3)
+ try
{
- fprintf(stderr, "Usage: fftester <filename> <wmf|jpg>\n");
- return -1;
- }
+ if (argc < 3)
+ {
+ fprintf(stderr, "Usage: fftester <filename> <wmf|jpg>\n");
+ return -1;
+ }
- OUString in(argv[1], strlen(argv[1]), RTL_TEXTENCODING_UTF8);
- OUString out;
- osl::File::getFileURLFromSystemPath(in, out);
+ OUString in(argv[1], strlen(argv[1]), RTL_TEXTENCODING_UTF8);
+ OUString out;
+ osl::File::getFileURLFromSystemPath(in, out);
- tools::extendApplicationEnvironment();
+ tools::extendApplicationEnvironment();
- Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
- Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
- if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
- comphelper::setProcessServiceFactory( xServiceManager );
- utl::ConfigManager::EnableAvoidConfig();
- InitVCL();
+ Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
+ Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
+ if( !xServiceManager.is() )
+ Application::Abort( "Failed to bootstrap" );
+ comphelper::setProcessServiceFactory( xServiceManager );
+ utl::ConfigManager::EnableAvoidConfig();
+ InitVCL();
try_again:
- {
- if (strcmp(argv[2], "wmf") == 0 || strcmp(argv[2], "emf") == 0)
- {
- GDIMetaFile aGDIMetaFile;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ReadWindowMetafile(aFileStream, aGDIMetaFile);
- }
- else if (strcmp(argv[2], "jpg") == 0)
- {
- Graphic aGraphic;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ImportJPEG(aFileStream, aGraphic, NULL, GraphicFilterImportFlags::NONE);
- }
- else if (strcmp(argv[2], "gif") == 0)
- {
- SvFileStream aFileStream(out, StreamMode::READ);
- Graphic aGraphic;
- ret = (int) ImportGIF(aFileStream, aGraphic);
- }
- else if (strcmp(argv[2], "xbm") == 0)
- {
- Graphic aGraphic;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ImportXBM(aFileStream, aGraphic);
- }
- else if (strcmp(argv[2], "xpm") == 0)
- {
- Graphic aGraphic;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ImportXPM(aFileStream, aGraphic);
- }
- else if (strcmp(argv[2], "png") == 0)
- {
- SvFileStream aFileStream(out, StreamMode::READ);
- vcl::PNGReader aReader(aFileStream);
- aReader.Read();
- }
- else if (strcmp(argv[2], "bmp") == 0)
- {
- Bitmap aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ReadDIB(aTarget, aFileStream, true);
- }
- else if (strcmp(argv[2], "svm") == 0)
- {
- GDIMetaFile aGDIMetaFile;
- SvFileStream aFileStream(out, StreamMode::READ);
- ReadGDIMetaFile(aFileStream, aGDIMetaFile);
- }
- else if (strcmp(argv[2], "pcd") == 0)
{
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ if (strcmp(argv[2], "wmf") == 0 || strcmp(argv[2], "emf") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libicdlo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ GDIMetaFile aGDIMetaFile;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) ReadWindowMetafile(aFileStream, aGDIMetaFile);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "dxf") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "jpg") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libidxlo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ Graphic aGraphic;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) ImportJPEG(aFileStream, aGraphic, NULL, GraphicFilterImportFlags::NONE);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "met") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "gif") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libimelo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ SvFileStream aFileStream(out, StreamMode::READ);
+ Graphic aGraphic;
+ ret = (int) ImportGIF(aFileStream, aGraphic);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if ((strcmp(argv[2], "pbm") == 0) || strcmp(argv[2], "ppm") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "xbm") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libipblo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ Graphic aGraphic;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) ImportXBM(aFileStream, aGraphic);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "psd") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "xpm") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libipdlo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ Graphic aGraphic;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) ImportXPM(aFileStream, aGraphic);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "eps") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "png") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libipslo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ SvFileStream aFileStream(out, StreamMode::READ);
+ vcl::PNGReader aReader(aFileStream);
+ aReader.Read();
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "pct") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "bmp") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libiptlo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ Bitmap aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) ReadDIB(aTarget, aFileStream, true);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "pcx") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "svm") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libipxlo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ GDIMetaFile aGDIMetaFile;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ReadGDIMetaFile(aFileStream, aGDIMetaFile);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "ras") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "pcd") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libiralo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libicdlo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "tga") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "dxf") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libitglo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libidxlo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if (strcmp(argv[2], "tif") == 0)
- {
- static PFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "met") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libitilo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("GraphicImport"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libimelo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- Graphic aTarget;
- SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
- }
- else if ( (strcmp(argv[2], "doc") == 0) ||
- (strcmp(argv[2], "ww8") == 0) ||
- (strcmp(argv[2], "ww6") == 0) ||
- (strcmp(argv[2], "ww2") == 0) )
- {
- static WFilterCall pfnImport(0);
- if (!pfnImport)
+ else if ((strcmp(argv[2], "pbm") == 0) || strcmp(argv[2], "ppm") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY);
- pfnImport = reinterpret_cast<WFilterCall>(
- aLibrary.getFunctionSymbol("TestImportDOC"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libipblo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- if (strcmp(argv[2], "ww6") == 0)
- ret = (int) (*pfnImport)(out, OUString("CWW6"));
- else if (strcmp(argv[2], "ww2") == 0)
- ret = (int) (*pfnImport)(out, OUString("WW6"));
- else
- ret = (int) (*pfnImport)(out, OUString("CWW8"));
- }
- else if (strcmp(argv[2], "hwp") == 0)
- {
- static HFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "psd") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libhwplo.so", SAL_LOADMODULE_LAZY);
- pfnImport = reinterpret_cast<HFilterCall>(
- aLibrary.getFunctionSymbol("TestImportHWP"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libipdlo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- ret = (int) (*pfnImport)(out);
- }
- else if (strcmp(argv[2], "lwp") == 0)
- {
- static HFilterCall pfnImport(0);
- if (!pfnImport)
+ else if (strcmp(argv[2], "eps") == 0)
{
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "liblwpftlo.so", SAL_LOADMODULE_LAZY);
- pfnImport = reinterpret_cast<HFilterCall>(
- aLibrary.getFunctionSymbol("TestImportLWP"));
- aLibrary.release();
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libipslo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
}
- ret = (int) (*pfnImport)(out);
+ else if (strcmp(argv[2], "pct") == 0)
+ {
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libiptlo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ }
+ else if (strcmp(argv[2], "pcx") == 0)
+ {
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libipxlo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ }
+ else if (strcmp(argv[2], "ras") == 0)
+ {
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libiralo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ }
+ else if (strcmp(argv[2], "tga") == 0)
+ {
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libitglo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ }
+ else if (strcmp(argv[2], "tif") == 0)
+ {
+ static PFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libitilo.so");
+ pfnImport = reinterpret_cast<PFilterCall>(
+ aLibrary.getFunctionSymbol("GraphicImport"));
+ aLibrary.release();
+ }
+ Graphic aTarget;
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ }
+ else if ( (strcmp(argv[2], "doc") == 0) ||
+ (strcmp(argv[2], "ww8") == 0) ||
+ (strcmp(argv[2], "ww6") == 0) ||
+ (strcmp(argv[2], "ww2") == 0) )
+ {
+ static WFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<WFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportDOC"));
+ aLibrary.release();
+ }
+ if (strcmp(argv[2], "ww6") == 0)
+ ret = (int) (*pfnImport)(out, OUString("CWW6"));
+ else if (strcmp(argv[2], "ww2") == 0)
+ ret = (int) (*pfnImport)(out, OUString("WW6"));
+ else
+ ret = (int) (*pfnImport)(out, OUString("CWW8"));
+ }
+ else if (strcmp(argv[2], "hwp") == 0)
+ {
+ static HFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libhwplo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<HFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportHWP"));
+ aLibrary.release();
+ }
+ ret = (int) (*pfnImport)(out);
+ }
+ else if (strcmp(argv[2], "lwp") == 0)
+ {
+ static HFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "liblwpftlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<HFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportLWP"));
+ aLibrary.release();
+ }
+ ret = (int) (*pfnImport)(out);
+ }
+
}
- }
+ /* To signal successful completion of a run, we need to deliver
+ SIGSTOP to our own process, then loop to the very beginning
+ once we're resumed by the supervisor process. We do this only
+ if AFL_PERSISTENT is set to retain normal behavior when the
+ program is executed directly; and take note of PERSIST_MAX. */
+ if (getenv("AFL_PERSISTENT") && persist_cnt++ < PERSIST_MAX)
+ {
+ raise(SIGSTOP);
+ goto try_again;
+ }
- /* To signal successful completion of a run, we need to deliver
- SIGSTOP to our own process, then loop to the very beginning
- once we're resumed by the supervisor process. We do this only
- if AFL_PERSISTENT is set to retain normal behavior when the
- program is executed directly; and take note of PERSIST_MAX. */
- if (getenv("AFL_PERSISTENT") && persist_cnt++ < PERSIST_MAX)
+ /* If AFL_PERSISTENT not set or PERSIST_MAX exceeded, exit normally. */
+ }
+ catch (const Exception& e)
{
- raise(SIGSTOP);
- goto try_again;
+ SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ }
+ catch (const std::exception &e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.what());
}
-
- /* If AFL_PERSISTENT not set or PERSIST_MAX exceeded, exit normally. */
_exit(ret);
}
More information about the Libreoffice-commits
mailing list