mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-23 22:42:06 +00:00
0aa974a439
The `struct selabel_digest` member `hashbuf_size` is used to compute hashes via `Sha1Update()`, which takes uint32_t as length parameter type. Use that same type for `hashbuf_size` to avoid potential value truncations, as the overflow check in `digest_add_specfile()` on `hashbuf_size` is based on it. label_support.c: In function ‘digest_gen_hash’: label_support.c:125:53: warning: conversion from ‘size_t’ {aka ‘long unsigned int’} to ‘uint32_t’ {aka ‘unsigned int’} may change value [-Wconversion] 125 | Sha1Update(&context, digest->hashbuf, digest->hashbuf_size); | ~~~~~~^~~~~~~~~~~~~~ Acked-by: James Carter <jwcart2@gmail.com> Signed-off-by: Christian Göttsche <cgzones@googlemail.com> |
||
---|---|---|
.. | ||
include | ||
man | ||
src | ||
utils | ||
LICENSE | ||
Makefile | ||
VERSION |