projects
/
yazpp-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:
6872248
)
GDU: if decode fails in assignment, reset m_gdu ptr
author
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 5 Oct 2013 14:26:33 +0000
(16:26 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 5 Oct 2013 14:26:33 +0000
(16:26 +0200)
This fixes a SEGV that could otherwise happen.
src/gdu.cpp
patch
|
blob
|
history
diff --git
a/src/gdu.cpp
b/src/gdu.cpp
index
fb87251
..
467ded2
100644
(file)
--- a/
src/gdu.cpp
+++ b/
src/gdu.cpp
@@
-44,7
+44,8
@@
void GDU::base(Z_GDU *gdu, ODR encode)
char *buf = odr_getbuf(encode, &len, 0);
odr_setbuf(m_decode, buf, len, 0);
- z_GDU(m_decode, &m_gdu, 0, 0);
+ if (!z_GDU(m_decode, &m_gdu, 0, 0))
+ m_gdu = 0;
}
odr_destroy(encode);
}