projects
/
yaz-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:
ba73ec3
)
Fix bug completeBER_n WRT too nested BER
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 21 May 2012 12:46:49 +0000
(14:46 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 21 May 2012 12:46:49 +0000
(14:46 +0200)
Function completeBER_n could return 0 (incomplete package) in case
where the BER package was considered too nested (return value of -2).
src/ber_any.c
patch
|
blob
|
history
diff --git
a/src/ber_any.c
b/src/ber_any.c
index
d5edc77
..
905b0c4
100644
(file)
--- a/
src/ber_any.c
+++ b/
src/ber_any.c
@@
-109,10
+109,9
@@
int completeBER_n(const unsigned char *buf, int len, int level)
{
if (b[0] == 0 && b[1] == 0)
break;
- if (!(res = completeBER_n(b, len, level+1)))
- return 0;
- if (res == -1)
- return -1;
+ res = completeBER_n(b, len, level+1);
+ if (res <= 0)
+ return res;
b += res;
len -= res;
}