[sword-svn] r2929 - in trunk: include utilities/diatheke

scribe at crosswire.org scribe at crosswire.org
Wed Jul 31 04:52:25 MST 2013


Author: scribe
Date: 2013-07-31 04:52:24 -0700 (Wed, 31 Jul 2013)
New Revision: 2929

Modified:
   trunk/include/config.h
   trunk/utilities/diatheke/corediatheke.cpp
Log:
applied a fix for previous unsafe memory usage in diatheke
updated config.h for windows platforms to have the correct version info


Modified: trunk/include/config.h
===================================================================
--- trunk/include/config.h	2013-07-31 02:36:08 UTC (rev 2928)
+++ trunk/include/config.h	2013-07-31 11:52:24 UTC (rev 2929)
@@ -54,7 +54,7 @@
 #define PACKAGE_NAME "sword"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "sword 1.7.0RC1"
+#define PACKAGE_STRING "sword 1.6.901"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "sword"
@@ -63,13 +63,13 @@
 #define PACKAGE_URL "http://crosswire.org/sword"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.7.0RC1"
+#define PACKAGE_VERSION "1.6.901"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "1.7.0RC1"
+#define VERSION "1.6.901"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */

Modified: trunk/utilities/diatheke/corediatheke.cpp
===================================================================
--- trunk/utilities/diatheke/corediatheke.cpp	2013-07-31 02:36:08 UTC (rev 2928)
+++ trunk/utilities/diatheke/corediatheke.cpp	2013-07-31 11:52:24 UTC (rev 2929)
@@ -303,7 +303,7 @@
 
 		target->setKey(ref);
 
-		const char * text = (const char *) *target;
+		SWBuf text = (const char *) *target;
 
 		if (outputformat == FMT_RTF) {
 			*output << "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\fdecor\\fprq2 ";
@@ -317,7 +317,7 @@
 			*output << "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">";
 		}
 
-		if (strlen(text)) {
+		if (text.length()) {
 			*output << (char*)target->getKeyText();
 			if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) {
 				*output << ": <font face=\"";




More information about the sword-cvs mailing list