1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/ldb/common
Douglas Bagnall 8892b0cc92 ldb: ldb_string_to_time reports more errors
The underlying function should return -1 and set errno when given invalid
strings, but we were not looking and have decided on 0 for error.

It would be a pain to change this function to return -1. Apart from the
API fuss, it is sometimes used unchecked to set an unsigned number and
an unchecked 0 is better than UINT*_MAX in those contexts.

It is probably not easy to get an -1 from a timegm() -- most
implementations will happily convert overflows for you, so e.g. the
15th month would be March of the next year. But EOVERFLOW is mentioned
in the manpages.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-02-29 04:01:40 +00:00
..
attrib_handlers.c lib:ldb:common: Fix code spelling 2023-04-04 07:31:36 +00:00
ldb_attributes.c ldb_tdb: Read from @INDEXLIST or an override if we are using a GUID index 2017-09-22 21:20:23 +02:00
ldb_controls.c ldb: Split out ldb_controls_get_control() to search a list of controls 2024-02-16 02:41:36 +00:00
ldb_debug.c lib/ldb: Do not vasprintf() the tevent debug messages that will not be shown 2012-08-09 20:14:23 +10:00
ldb_dn.c lib: Save intermediate NULL checks with talloc_asprintf_addbuf() 2022-12-14 04:32:34 +00:00
ldb_ldif.c lib:ldb: do not offset against NULL pointer in ldb_ldif_read() 2023-05-09 01:59:32 +00:00
ldb_match.c CVE-2023-0614 ldb: Filter on search base before redacting message 2023-04-05 02:10:35 +00:00
ldb_modules.c ldb: Fix code spelling 2023-10-25 22:23:37 +00:00
ldb_msg.c ldb: ldb_string_to_time reports more errors 2024-02-29 04:01:40 +00:00
ldb_options.c ldb: Add new internal helper function ldb_options_get() 2019-07-04 10:02:23 +00:00
ldb_pack.c ldb: Avoid undefined pointer arithmetic 2023-04-12 13:52:31 +00:00
ldb_parse.c ldb: Use correct member of union 2023-04-05 02:10:35 +00:00
ldb_utf8.c lib:ldb: Use ldb_ascii_toupper() for case folding 2022-12-23 13:23:29 +00:00
ldb.c ldb: Fix code spelling 2024-02-16 02:41:36 +00:00
qsort.c ldb: Fix overflow checks 2018-04-03 20:20:10 +02:00