projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b406cb
)
client: Fix return value check for sb_received().
author
Andre Noll
<maan@tuebingen.mpg.de>
Thu, 9 Oct 2014 00:33:06 +0000
(
00:33
+0000)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Sun, 18 Jan 2015 14:45:23 +0000
(15:45 +0100)
This bug can cause the client to segfault if it is fed invalid data.
client_common.c
patch
|
blob
|
history
diff --git
a/client_common.c
b/client_common.c
index f615bb7289bd1951057a20743a21045019109a18..b47364c9bd7b91c09d2e0c28fedc69efd3e5c6d0 100644
(file)
--- a/
client_common.c
+++ b/
client_common.c
@@
-159,7
+159,10
@@
again:
}
if (n == 0)
return 0;
- if (!sb_received(ct->sbc[0], n, result))
+ ret = sb_received(ct->sbc[0], n, result);
+ if (ret < 0)
+ return ret;
+ if (ret == 0)
goto again;
ct->sbc[0] = NULL;
return 1;