projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix potential buffer overrun that could occur if SRU charset name
[yaz-moved-to-github.git]
/
ztest
/
ztest.c
diff --git
a/ztest/ztest.c
b/ztest/ztest.c
index
6ae20f2
..
67a4f06
100644
(file)
--- a/
ztest/ztest.c
+++ b/
ztest/ztest.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.89 2007-05-02 11:53:25 adam Exp $
+ * $Id: ztest.c,v 1.92 2007-05-30 08:04:28 adam Exp $
*/
/*
*/
/*
@@
-40,14
+40,6
@@
int ztest_search(void *handle, bend_search_rr *rr)
rr->errcode = 23;
return 0;
}
rr->errcode = 23;
return 0;
}
-#if NMEM_DEBUG
- /* if database is stop, stop this process.. For debugging only. */
- if (!yaz_matchstr (rr->basenames[0], "stop"))
- {
- nmem_print_list_l(YLOG_LOG);
- exit(0);
- }
-#endif
/* Throw Database unavailable if other than Default or Slow */
if (!yaz_matchstr (rr->basenames[0], "Default"))
; /* Default is OK in our test */
/* Throw Database unavailable if other than Default or Slow */
if (!yaz_matchstr (rr->basenames[0], "Default"))
; /* Default is OK in our test */
@@
-138,7
+130,7
@@
int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
if (r->direct_reference)
{
char oid_name_str[OID_STR_MAX];
if (r->direct_reference)
{
char oid_name_str[OID_STR_MAX];
- int oclass;
+ oid_class oclass;
const char *oid_name =
yaz_oid_to_string_buf(r->direct_reference,
&oclass, oid_name_str);
const char *oid_name =
yaz_oid_to_string_buf(r->direct_reference,
&oclass, oid_name_str);
@@
-460,10
+452,10
@@
int ztest_present (void *handle, bend_present_rr *rr)
int ztest_fetch(void *handle, bend_fetch_rr *r)
{
char *cp;
int ztest_fetch(void *handle, bend_fetch_rr *r)
{
char *cp;
- int oclass;
+ oid_class oclass;
char oid_str_buf[OID_STR_MAX];
const char *oid_str = 0;
char oid_str_buf[OID_STR_MAX];
const char *oid_str = 0;
- const int *oid = r->request_format;
+ const Odr_oid *oid = r->request_format;
r->last_in_set = 0;
r->basename = "Default";
r->last_in_set = 0;
r->basename = "Default";
@@
-722,6
+714,7
@@
bend_initresult *bend_init(bend_initrequest *q)
q->bend_srw_update = ztest_update;
q->query_charset = "ISO-8859-1";
q->bend_srw_update = ztest_update;
q->query_charset = "ISO-8859-1";
+ q->records_in_same_charset = 0;
return r;
}
return r;
}