]> git.tuebingen.mpg.de Git - paraslash.git/commit
afh_recv: Check return value of afh_get_chunk().
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 18:57:38 +0000 (20:57 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 23:31:35 +0000 (01:31 +0200)
commit2ddd3e0c78a3446d227892002a648a744668988b
tree3bc56d707ad62e093f608c169e894a46ed62fd64
parentb88ffaddf05d7f4dae85d118a58029ce683c5b3d
afh_recv: Check return value of afh_get_chunk().

Starting with commit b6b571e6c (afh: Dynamic chunks) the function
returns an int value and may fail. Although we store the return value
in a variable, the value of the variable is never read, causing the
clang static analyzer to complain (rightfully).

This patch modifies afh_recv_post_select() to fail if afh_get_chunk()
returns negative.
afh_recv.c