mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 04:15:07 -05:00
cmdmon: change name fields to unsigned type
This commit is contained in:
4
candm.h
4
candm.h
@@ -271,7 +271,7 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
int8_t name[256];
|
uint8_t name[256];
|
||||||
uint32_t port;
|
uint32_t port;
|
||||||
int32_t minpoll;
|
int32_t minpoll;
|
||||||
int32_t maxpoll;
|
int32_t maxpoll;
|
||||||
@@ -732,7 +732,7 @@ typedef struct {
|
|||||||
} RPY_NTPData;
|
} RPY_NTPData;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int8_t name[256];
|
uint8_t name[256];
|
||||||
int32_t EOR;
|
int32_t EOR;
|
||||||
} RPY_NTPSourceName;
|
} RPY_NTPSourceName;
|
||||||
|
|
||||||
|
|||||||
2
client.c
2
client.c
@@ -2076,7 +2076,7 @@ get_source_name(IPAddr *ip_addr, char *buf, int size)
|
|||||||
UTI_IPHostToNetwork(ip_addr, &request.data.ntp_source_name.ip_addr);
|
UTI_IPHostToNetwork(ip_addr, &request.data.ntp_source_name.ip_addr);
|
||||||
if (!request_reply(&request, &reply, RPY_NTP_SOURCE_NAME, 0) ||
|
if (!request_reply(&request, &reply, RPY_NTP_SOURCE_NAME, 0) ||
|
||||||
reply.data.ntp_source_name.name[sizeof (reply.data.ntp_source_name.name) - 1] != '\0' ||
|
reply.data.ntp_source_name.name[sizeof (reply.data.ntp_source_name.name) - 1] != '\0' ||
|
||||||
snprintf(buf, size, "%s", reply.data.ntp_source_name.name) >= size)
|
snprintf(buf, size, "%s", (char *)reply.data.ntp_source_name.name) >= size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Make sure the name is printable */
|
/* Make sure the name is printable */
|
||||||
|
|||||||
Reference in New Issue
Block a user