projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
588d761
)
Fix null ptr WRT sortkeys check
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 19 May 2011 11:20:27 +0000
(13:20 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 19 May 2011 11:20:27 +0000
(13:20 +0200)
index/zebrasrv.c
patch
|
blob
|
history
diff --git
a/index/zebrasrv.c
b/index/zebrasrv.c
index
75fabaa
..
7ef4cd2
100644
(file)
--- a/
index/zebrasrv.c
+++ b/
index/zebrasrv.c
@@
-17,6
+17,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@
-274,10
+277,11
@@
static Z_RPNQuery *query_add_sortkeys(ODR o, Z_RPNQuery *query,
/* sortkey layour: path,schema,ascending,caseSensitive,missingValue */
/* see cql_sortby_to_sortkeys of YAZ. */
char **sortspec;
/* sortkey layour: path,schema,ascending,caseSensitive,missingValue */
/* see cql_sortby_to_sortkeys of YAZ. */
char **sortspec;
- int num_sortspec;
+ int num_sortspec = 0;
int i;
int i;
- nmem_strsplit_blank(odr_getmem(o), sortKeys, &sortspec, &num_sortspec);
+ if (sortKeys)
+ nmem_strsplit_blank(odr_getmem(o), sortKeys, &sortspec, &num_sortspec);
if (num_sortspec > 0)
{
Z_RPNQuery *nquery;
if (num_sortspec > 0)
{
Z_RPNQuery *nquery;