1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00
Andreas Schneider d650f884ec lib:ldb: Use correct integer types for sizes
Error: INTEGER_OVERFLOW (CWE-190):
ldb-2.9.0/common/ldb_ldif.c:84: tainted_data_return: Called function "read(f, buf, size)", and a possible return value may be less than zero.
ldb-2.9.0/common/ldb_ldif.c:84: cast_overflow: An assign that casts to a different type, which might trigger an overflow.
ldb-2.9.0/common/ldb_ldif.c:92: overflow: The expression "size" is considered to have possibly overflowed.
ldb-2.9.0/common/ldb_ldif.c:84: overflow_sink: "size", which might be negative, is passed to "read(f, buf, size)". [Note: The source code implementation of the function has been overridden by a builtin model.]
    82|           buf = (char *)value->data;
    83|           while (count < statbuf.st_size) {
    84|->                 bytes = read(f, buf, size);
    85|                   if (bytes == -1) {
    86|                           talloc_free(value->data);

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Apr 30 15:33:32 UTC 2024 on atb-devel-224
2024-04-30 15:33:32 +00:00
..
2022-02-24 09:15:34 +00:00
2023-10-25 22:23:37 +00:00
2020-07-02 10:38:34 +00:00
2018-05-23 02:27:12 +02:00
2023-04-05 02:10:35 +00:00
2023-04-11 09:06:35 +00:00
2023-10-25 22:23:37 +00:00
2023-04-11 09:06:35 +00:00
2023-04-04 07:31:36 +00:00
2024-04-24 05:16:29 +00:00