projects
/
metaproxy-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:
7971e2f
)
multi: Fix check for opt Records in present response
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 28 Sep 2012 12:26:09 +0000
(14:26 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 28 Sep 2012 12:26:09 +0000
(14:26 +0200)
A SEGV could occur if a target did not return records and
no diagnostics.
src/filter_multi.cpp
patch
|
blob
|
history
diff --git
a/src/filter_multi.cpp
b/src/filter_multi.cpp
index
4eb1988
..
ccefccf
100644
(file)
--- a/
src/filter_multi.cpp
+++ b/
src/filter_multi.cpp
@@
-887,7
+887,7
@@
void yf::Multi::Frontend::present(mp::Package &package, Z_APDU *apdu_req)
nprl->records[i] = (Z_NamePlusRecord*)
odr_malloc(odr, sizeof(Z_NamePlusRecord));
int inside_pos = jit->m_pos - jit->m_start;
- if (inside_pos >= b_resp->records->
+ if (!b_resp->records || inside_pos >= b_resp->records->
u.databaseOrSurDiagnostics->num_records)
break;
*nprl->records[i] = *b_resp->records->