From: Stefan Metzmacher Date: Wed, 16 Nov 2022 11:08:45 +0000 (+0100) Subject: CVE-2022-42898: HEIMDAL: lib/krb5: fix _krb5_get_int64 on systems where 'unsigned... X-Git-Tag: samba-4.15.13~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3672577a8e15b7937d0067a262d04df632dade9;p=thirdparty%2Fsamba.git CVE-2022-42898: HEIMDAL: lib/krb5: fix _krb5_get_int64 on systems where 'unsigned long' is just 32-bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15203 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(v4-15-test): Jule Anger Autobuild-Date(v4-15-test): Wed Nov 23 18:54:37 UTC 2022 on sn-devel-184 --- diff --git a/source4/heimdal/lib/krb5/store-int.c b/source4/heimdal/lib/krb5/store-int.c index 542b99abc08..6fe7eb37fc6 100644 --- a/source4/heimdal/lib/krb5/store-int.c +++ b/source4/heimdal/lib/krb5/store-int.c @@ -49,7 +49,7 @@ KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL _krb5_get_int64(void *buffer, uint64_t *value, size_t size) { unsigned char *p = buffer; - unsigned long v = 0; + uint64_t v = 0; size_t i; for (i = 0; i < size; i++) v = (v << 8) + p[i];