From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 78856740035 for ; Tue, 24 Sep 2024 03:25:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3gH5M+ekcMZXmUhhYsLfdXwipRrF552uUiYYO88EG50=; c=relaxed/simple; d=groups.io; h=Subject:To:From:User-Agent:MIME-Version:Date:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1727148355; v=1; x=1727407554; b=KTJ4FkdnITQMo3ob6R6eUAsn1sRo9PNjDzNErGjJAjKopLEMYRtSXmcBASCXlqj/qtbPH62q tjINYFPGjm6m/ajIjMde9lQkx7/5V2gDrdpodVqRju0PfrRAd0YaEMbVMx/ipTrpGc5c5yS5b8W xcEqsEoh+H1MxuABYqII03YEDudPA9OkQwtSNoA5d1QrzuXMDuF7UIZilvBsf7Ff083znUwYlbo 1oYEi113z+43q24QW2d493WFwbMUT1tcelw1+NTwQSh5V0C4o+Bh12zgOemjOz3l4cfy5l1VcLW 9NRP5Vt3IoAp+GhUzbzLyaymqeptKDi2gJmzaBKN7mjkA== X-Received: by 127.0.0.2 with SMTP id 1M32YY7687511xofCWPqLOCP; Mon, 23 Sep 2024 20:25:54 -0700 Subject: [edk2-devel] EDK2-TEST/EMS: TimeStamp overflow To: devel@edk2.groups.io From: wzssyqa+uefi@gmail.com X-Originating-Location: (194.169.55.179) X-Originating-Platform: Mac Safari 18 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 23 Sep 2024 19:10:00 -0700 Message-ID: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,wzssyqa+uefi@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: AbRtwEI9CbXMW7XYgtWT428Px7686176AA= Content-Type: multipart/alternative; boundary="5igAb16BbIvoVsm528St" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=KTJ4Fkdn; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --5igAb16BbIvoVsm528St Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable In file /edk2-test/uefi-sct/EMS/Src/EmsRpc/EmsRpcEth.c, there are line like= : GetSystemTime ( & Time); FillCnlLlFlag (Packet, LastSendSeq, LINK_OPERATION_CLEANUP, 0 , FALSE ); TimeStamp +=3D ((UINT64) Time. wYear * 12 * 31 * 24 * 60 * 60 ); TimeStamp +=3D ((UINT64) Time. wMonth * 31 * 24 * 60 * 60 ); TimeStamp +=3D ((UINT64) Time. wDay * 24 * 60 * 60 ); TimeStamp +=3D ((UINT64) Time. wHour * 60 * 60 ); TimeStamp +=3D ((UINT64) Time. wMinute * 60 ); TimeStamp +=3D Time. wSecond ; TimeStamp <<=3D 32 ; TimeStamp +=3D Time. wMilliseconds ; The value of `2024*12*31*24*60*60` is 65052979200, which is out of the rang= e of 32bit. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120578): https://edk2.groups.io/g/devel/message/120578 Mute This Topic: https://groups.io/mt/108622514/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --5igAb16BbIvoVsm528St Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
In file /edk2-test/uefi-sct/EMS/Src/EmsRpc/EmsRpcEth.c, there are line= like:
 
(&Time);

(Packet, LastSendSeq,= LINK_OPERATION_CLEANUP, 0, FALSE= );
TimeStamp +=3D ((UINT64)Time.wYear * 12 * 31 * 24= * 60 *60);
TimeStamp +=3D ((UINT64)Time.wMonth * 31 * 24 * 6= 0 *60);
TimeStamp +=3D ((UINT64)Time.wDay * 24 * 60 *= 60);=
TimeStamp +=3D ((UINT64)Time.wHour * 60 * 60);
TimeStamp +=3D ((UINT64)Time.wMinute * 60);
TimeStamp +=3D Time.wSecond= ;
TimeStamp <<=3D 32;
TimeStamp +=3D Time.wMilliseconds;
 
The value of `2024*12*31*24*60*60` is  65052979200, which is out of the= range of 32bit.
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#120578) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--5igAb16BbIvoVsm528St--