[zorba] avoid passing NULL to 1st strtok call (rhbz#1069294)

Kyle McMartin kyle at fedoraproject.org
Tue Feb 25 17:22:43 UTC 2014


commit 8ddf04d19f3efde785ea0271f1f94d195f266b73
Author: Kyle McMartin <kyle at mcmartin.ca>
Date:   Tue Feb 25 11:50:51 2014 -0500

    avoid passing NULL to 1st strtok call (rhbz#1069294)

 zorba-check-dll_path.patch |   12 ++++++++++++
 zorba.spec                 |    6 ++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/zorba-check-dll_path.patch b/zorba-check-dll_path.patch
new file mode 100644
index 0000000..9a63e10
--- /dev/null
+++ b/zorba-check-dll_path.patch
@@ -0,0 +1,12 @@
+diff -Nur zorba-2.9.1/src/context/root_static_context.cpp zorba-2.9.1~/src/context/root_static_context.cpp
+--- zorba-2.9.1/src/context/root_static_context.cpp	2013-05-29 03:47:42.000000000 -0400
++++ zorba-2.9.1~/src/context/root_static_context.cpp	2014-02-25 10:47:01.704314908 -0500
+@@ -99,6 +99,8 @@
+     std::vector<zstring>& pathsVector)
+ {
+   char* dll_path = getenv(env_var_name);
++  if (dll_path == NULL)
++    return;
+   char* str_env = std::strtok(dll_path, ";");
+   while (str_env !=NULL)
+   {
diff --git a/zorba.spec b/zorba.spec
index be26b99..b6b8a39 100644
--- a/zorba.spec
+++ b/zorba.spec
@@ -25,6 +25,8 @@ Source0: http://launchpad.net/zorba/trunk/2.8/+download/%{name}-%{version}.tar.g
 
 # adapt path to php API wrapper 
 Patch0:  zorba-php-wrapper.patch
+# rhbz#1069294
+Patch1:  zorba-check-dll_path.patch
 
 BuildRequires: bison
 BuildRequires: boost-devel
@@ -129,6 +131,7 @@ the programming APIs.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # xqc.h is provided by xqc package
 rm -f src/include/xqc.h
@@ -239,6 +242,9 @@ rm -f doc.tmp/*.txt
 
 
 %changelog
+* Tue Feb 25 2014 Kyle McMartin <kyle at redhat.com>
+- fix strtok(NULL, ...) on armv7hl and aarch64 (and ppc64 and s390x...)
+
 * Fri Feb 14 2014 David Tardon <dtardon at redhat.com> - 2.9.1-4
 - rebuild for new ICU
 


More information about the scm-commits mailing list