1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/ctdb/event
Martin Schwenke f01a179abc ctdb-tools: Fix CID 1539212 - signed/unsigned issue
>>>     CID 1539212:  Control flow issues  (NO_EFFECT)
>>>     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "p >= 0UL".
216     		while (p >= 0 && output[p] == '\n') {

This is a real problem in the unlikely event that the output contains
only newlines.

Fix the issue by using a pointer and add a test to cover this case.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15438

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2023-08-07 08:43:39 +00:00
..
event_client.c
event_cmd.c
event_conf.c
event_conf.h
event_config.c
event_context.c
event_daemon.c ctdb-event: Reopen logs on SIGHUP 2022-01-17 03:43:30 +00:00
event_private.h
event_protocol_api.h
event_protocol_test.c ctdb-tests: Iterate protocol tests internally 2022-02-14 04:32:29 +00:00
event_protocol_util.c
event_protocol.c
event_protocol.h
event_request.c
event_tool.c ctdb-tools: Fix CID 1539212 - signed/unsigned issue 2023-08-07 08:43:39 +00:00
event_tool.h
event.h