From 938540723c0d7c1bf6ab11c43620ca13777fbe31 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 28 Nov 2019 05:17:23 +0000 Subject: [PATCH] async dns: format string for pointer arithmetic https://github.com/warmcat/libwebsockets/issues/1780 --- lib/system/async-dns/async-dns-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/system/async-dns/async-dns-parse.c b/lib/system/async-dns/async-dns-parse.c index bbfed3451..00f53f2d1 100644 --- a/lib/system/async-dns/async-dns-parse.c +++ b/lib/system/async-dns/async-dns-parse.c @@ -76,8 +76,8 @@ again1: ll = *ls++; if (ls + ll + 1 > e) { - lwsl_notice("%s: label len invalid, %ld vs %ld\n", __func__, - (ls + ll + 1) - pkt, e - pkt); + lwsl_notice("%s: label len invalid, %d vs %d\n", __func__, + lws_ptr_diff((ls + ll + 1), pkt), lws_ptr_diff(e, pkt)); return -1; }