diff --git a/src/decode_aprs.c b/src/decode_aprs.c index 81ae9bf..acfed6b 100644 --- a/src/decode_aprs.c +++ b/src/decode_aprs.c @@ -1424,7 +1424,7 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int if (ilen < sizeof(struct aprs_mic_e_s)) { if ( ! A->g_quiet) { text_color_set(DW_COLOR_ERROR); - dw_printf("MIC-E format must have at least %d characters in the information part.\n", sizeof(struct aprs_mic_e_s)); + dw_printf("MIC-E format must have at least %d characters in the information part.\n", (int)(sizeof(struct aprs_mic_e_s))); } return; } diff --git a/src/deviceid.c b/src/deviceid.c index 036c7b0..49b9b34 100644 --- a/src/deviceid.c +++ b/src/deviceid.c @@ -620,7 +620,7 @@ static inline int strncmp_z (char *a, char *b, size_t len) void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, char *device, size_t device_size) { strlcpy (device, "UNKNOWN vendor/model", device_size); - strlcpy (trimmed, comment, sizeof(trimmed)); + strlcpy (trimmed, comment, trimmed_size); if (strlen(comment) < 1) { return; } @@ -675,7 +675,7 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch // Not found. strlcpy (device, "UNKNOWN vendor/model", device_size); - strlcpy (trimmed, comment, sizeof(trimmed)); + strlcpy (trimmed, comment, trimmed_size); } // end deviceid_decode_mice