aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoonas Kylmälä <joonas.kylmala@iki.fi>2020-12-02 15:25:44 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-12-03 01:40:28 +0100
commitc9828bb0cd3b03fc453328c62bcccd06b3517267 (patch)
tree75cb1d6bff4685d4ed7307f4567548e0617281c9 /tools
parent2cfe1119318c1b58e50dbedf6d5ceebc94cebba9 (diff)
downloadhardware_replicant_libsamsung-ipc-c9828bb0cd3b03fc453328c62bcccd06b3517267.tar.gz
hardware_replicant_libsamsung-ipc-c9828bb0cd3b03fc453328c62bcccd06b3517267.tar.bz2
hardware_replicant_libsamsung-ipc-c9828bb0cd3b03fc453328c62bcccd06b3517267.zip
samsung-ipc: rfs: fix incorrect sign comparison for md5 file length
When compiling with warnings (-Werror -W -Wall -Wunused -Wunused-function) enabled we get: rfs.c: In function ‘ipc_nv_data_md5_path_check’: rfs.c:115:17: error: comparison of integer expressions of different signedness: ‘__off_t’ {aka ‘long int’} and ‘long unsigned int’ [-Werror=sign-compare] if (st.st_size < 2 * sizeof(char) * MD5_DIGEST_LENGTH) { ^ This simplifies the comparison by making sure we have exactly 32 bytes (2*MD5_DIGEST_LENGTH, i.e. md5 digest in ascii) in the file we read the MD5 digest from. Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Tested-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions