From 396ae6b8b591f0274a1edbdf28ee65f1d245ffe4 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 1 Jun 2021 13:12:46 -0400 Subject: [PATCH] 2021-06-01 Fred Gleason * Cleaned up compile warnings in 'lib/rduser.cpp'. Signed-off-by: Fred Gleason --- ChangeLog | 2 ++ lib/rduser.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aafae0db..1a87ec1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21794,3 +21794,5 @@ * Cleaned up compile warnings in 'lib/rdupload.cpp'. 2021-06-01 Fred Gleason * Cleaned up compile warnings in 'lib/rdunixsocket.cpp'. +2021-06-01 Fred Gleason + * Cleaned up compile warnings in 'lib/rduser.cpp'. diff --git a/lib/rduser.cpp b/lib/rduser.cpp index 887ce5b2..4ddc03a5 100644 --- a/lib/rduser.cpp +++ b/lib/rduser.cpp @@ -675,7 +675,7 @@ bool RDUser::createTicket(QString *ticket,QDateTime *expire_dt, for(int i=0;i<5;i++) { long r=random(); unsigned ipv4_addr=client_addr.toIPv4Address(); - snprintf(rawstr+i*8,8,"%c%c%c%c%c%c%c%c", + snprintf(rawstr+i*8,9,"%c%c%c%c%c%c%c%c", 0xff&((int)r>>24),0xff&(ipv4_addr>>24), 0xff&((int)r>>16),0xff&(ipv4_addr>>16), 0xff&((int)r>>8),0xff&(ipv4_addr>>8),