summaryrefslogtreecommitdiffstats
path: root/src/python/pysss_murmur.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2016-07-01 23:18:46 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-06 17:27:25 +0200
commitc7c1941f9045531044121520fc2ca0e048732c25 (patch)
tree81d26f995612ea6476a0f7cfafa3930d3c647269 /src/python/pysss_murmur.c
parent5e843d18e161057966e0ef4d303774b93fe56139 (diff)
downloadsssd-c7c1941f9045531044121520fc2ca0e048732c25.tar.gz
sssd-c7c1941f9045531044121520fc2ca0e048732c25.tar.xz
sssd-c7c1941f9045531044121520fc2ca0e048732c25.zip
test_sysdb_ts_cache: Do not use wrong pointer for output argument
The function sysdb_search_groups expects pointer to size_t as an output argument msgs_count. However, struct ldb_result has type unsigned for element count. The size of unsigned is lower then size of size_t on some platforms. Therefore we should not cast to pointer to size_t if we want to write count of messages into struct ldb_result -> count. The valgrind did not detect write out of boundary for the element count because it is the 1st element in structure ldb_result. It didn't cause any problem on little endian because the most significant part of size_t was properly stored to type unsigned. We firstly store to output argument _msgs_count and then to output argument _msgs in the function sysdb_cache_search_entry therefore element msgs was not damaged and contained correct data. Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/python/pysss_murmur.c')
0 files changed, 0 insertions, 0 deletions