]> git.tuebingen.mpg.de Git - paraslash.git/commit
para_server: Never read past the end of the chunk table.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 22 Dec 2016 01:38:05 +0000 (02:38 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 25 Mar 2017 10:54:36 +0000 (11:54 +0100)
commite0f54e42887a8beef092755f5ed9cdf6d499bef2
tree2074057ce5362c242146be2cfa07e3b14a7fd255
parentdbb405c2381c2264ab7da2aa80bdb2cfc6e9d51d
para_server: Never read past the end of the chunk table.

If the server command "ls" is executed with the -c option to print
the chunk table, we assume that afhi->chunks_total many chunks are
stored in the osl disk object that represents the chunk table.

This should be true in general, but since we also know the size of
the osl object, it does not hurt to check this bound as well and
break out of the loop if the next read would access memory beyond
the end of the object.
aft.c