public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] EDK2-TEST/EMS: TimeStamp overflow
@ 2024-09-24  2:10 wzssyqa+uefi
  0 siblings, 0 replies; only message in thread
From: wzssyqa+uefi @ 2024-09-24  2:10 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

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 += ((UINT64) Time. wYear * 12 * 31 * 24 * 60 * 60 );
TimeStamp += ((UINT64) Time. wMonth * 31 * 24 * 60 * 60 );
TimeStamp += ((UINT64) Time. wDay * 24 * 60 * 60 );
TimeStamp += ((UINT64) Time. wHour * 60 * 60 );
TimeStamp += ((UINT64) Time. wMinute * 60 );
TimeStamp += Time. wSecond ;
TimeStamp <<= 32 ;
TimeStamp += Time. wMilliseconds ;

The value of `2024*12*31*24*60*60` is 65052979200, which is out of the range of 32bit.


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 6645 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-24  3:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24  2:10 [edk2-devel] EDK2-TEST/EMS: TimeStamp overflow wzssyqa+uefi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox