linux-application-whitelisting / fapolicyd

File Access Policy Daemon
GNU General Public License v3.0
192 stars 55 forks source link

Add checking size that can be obtained with get_pages_in_use() #221

Closed iwamatsu closed 1 year ago

iwamatsu commented 1 year ago

The get_pages_in_use () return 0 sometime. In this case, 0 divisions run. This adds a check of retuen value to avoid this problem.

Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org

radosroka commented 1 year ago

Can you rebase your branch?

stevegrubb commented 1 year ago

I'd prefer to say that the database is empty since that is the logical conclusion of size == 0. I'll fix that up after merging. Thanks for the patch.