From 51d23b5ef3018cebeb689c81f39ca88c5717d191 Mon Sep 17 00:00:00 2001 From: David Abram Cargill <cargilld@apache.org> Date: Mon, 6 Dec 2004 11:45:14 +0000 Subject: [PATCH] Add check to Xlat to see if message text is greater than 128 characters. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@176227 13f79535-47bb-0310-9956-ffa450edef68 --- tools/NLS/Xlat/Xlat.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/NLS/Xlat/Xlat.cpp b/tools/NLS/Xlat/Xlat.cpp index b85e80289..302ee1ac0 100644 --- a/tools/NLS/Xlat/Xlat.cpp +++ b/tools/NLS/Xlat/Xlat.cpp @@ -17,6 +17,9 @@ /* * $Log$ + * Revision 1.22 2004/12/06 11:45:14 cargilld + * Add check to Xlat to see if message text is greater than 128 characters. + * * Revision 1.21 2004/09/08 13:57:07 peiyongz * Apache License Version 2.0 * @@ -381,6 +384,13 @@ enumMessages( const DOMElement* srcElem // Write out an entry to the target header file. These are enums, so // we use the id as the enum name. // + + if (XMLString::stringLen(msgText) > 128) { + wprintf(L"Message text %s is too long, 128 character limit\n\n", xmlStrToPrintable(msgText)); + throw ErrReturn_SrcFmtError; + } + + fwprintf(headerFl, L" , %-32s = %d\n", xmlStrToPrintable(msgId), count); releasePrintableStr -- GitLab