From 9754192f9b4cdd5d2bf9e89c8f05a8986cd75e21 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 9 Oct 2014 18:09:06 -0700 Subject: Cast size_t to to gulong as the length argument to g_snprintf(). Sadly, the GTK+ folks decided not to use size_t for the size argument, so it doesn't do the right thing on LLP64 platforms such as Windows. Change-Id: I2aa9096215c488b48f1cf68d2a285a48abb6f07f Reviewed-on: https://code.wireshark.org/review/4584 Reviewed-by: Guy Harris --- wiretap/k12text.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wiretap/k12text.l b/wiretap/k12text.l index 69a2a982ef..376ea2ce5a 100644 --- a/wiretap/k12text.l +++ b/wiretap/k12text.l @@ -410,17 +410,17 @@ k12text_dump(wtap_dumper *wdh _U_, const struct wtap_pkthdr *phdr, p += wl; left -= wl; - wl = g_snprintf(p, left, "%.3d,%.3d %s\r\n|0 |", ms, ns, str_enc); + wl = g_snprintf(p, (gulong)left, "%.3d,%.3d %s\r\n|0 |", ms, ns, str_enc); p += wl; left -= wl; for(i = 0; i < phdr->caplen && left > 2; i++) { - wl = g_snprintf(p, left, "%.2x|", pd[i]); + wl = g_snprintf(p, (gulong)left, "%.2x|", pd[i]); p += wl; left -= wl; } - wl = g_snprintf(p, left, "\r\n\r\n"); + wl = g_snprintf(p, (gulong)left, "\r\n\r\n"); left -= wl; ret = wtap_dump_file_write(wdh, buf, K12BUF_SIZE - left, err); -- cgit v1.2.3