View Issue Details

IDProjectCategoryView StatusLast Update
00033302 - Next Dev List (Holding Area)Bugpublic2020-07-02 02:11
ReporterK7ZCZAssigned ToDOUG 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionreopened 
Summary0003330: Soraco Licenser assigns bogus version number to shared memory license structure
DescriptionData of an incorrect format is being set to a shared structure in the MyStation shared memory. Maybe this doesn't lead to trouble, but it should be investigated -- I don't believe the code can possibly be correct.
Steps To ReproduceThis warning appears in builds of the 6.6 tree:

c:\hrd66\hrdstation\hrdsoracolicenser.cpp(179): warning C4244: '=': conversion from 'double' to 'DWORD', possible loss of data

Investigating the warning, we find this code:

   g_pSharedMemory->sm_License[0].lic_dwMaxVersion = 6.5;

lic_dwMaxVersion is a DWORD, so it can't possibly accept a floating point value. This field typically uses a packed representation of the version number, where some bits have the major version number and some bits have the minor version number. Other references to this field in the project show that it's packed and unpacked.

This new warning should be investigated and fixed so we can be sure that it isn't causing trouble, or setting a trap for the future.

TagsNo tags attached.
ModuleSW License Mgmt
Sub-ModuleSW License Client
TestingNot Started



2019-06-10 23:13

developer   ~0008034

Yeah that shared memory code is all over the place so I didn't want to mess with it much. I guess I just defaulted it to a bad value, and ignored the compiler warning. I don't think that value is something to we have to worry about any more. So I am just setting it to HRDVER now.


2019-06-10 23:23

developer   ~0008035

Is the shared memory mechanism something we can disconnect altogether?


2019-06-10 23:45

developer   ~0008038

That was the first approach I took. Then I realized that it would require touching a bunch of code across a lot of the projects. I then decided to leave it so my changes were confined to HRDStation.dll.


2019-06-23 17:07

developer   ~0008183

I am going to resolve this one, I fixed the original bug, and getting rid of the shared memory code is not something we are going to do in this version.


2019-09-14 02:23

administrator   ~0008553

How do we test this?


2019-09-22 14:04

developer   ~0008576

This was primarily getting rid of a compiler warning and the variable in question isn't used. So I would say as long as the program runs and allows you to license, this one is fixed.


2019-11-04 03:36

administrator   ~0009123

Accepted as validated.


2019-11-04 07:23

developer   ~0009125

This isn't adequately fixed. If the field isn't used, it should be removed and the surrounding code simplified.


2019-11-04 07:29

developer   ~0009126

Aside from copying passed values around, it looks to me like the only reads of the field are in HRDStationIsDeveloper() and HRDIsValidLicense(), where different license types (of the LIC_TYPE enum) are identified.

HRDStationIsDeveloper() is never called. Why can't it be removed?

HRDIsValidLicense() is called, but only ever chekced for a true/false response. This seems closely related to 3450, which identifies more license client code that seems obsolete.


2019-11-08 02:21

administrator   ~0009205

Not sure what to do with this. I took the FiV off it until we sort it out.

Issue History

Date Modified Username Field Change
2019-06-07 08:33 K7ZCZ New Issue
2019-06-07 08:33 K7ZCZ Status new => assigned
2019-06-07 08:33 K7ZCZ Assigned To => DOUG
2019-06-10 23:13 DOUG Note Added: 0008034
2019-06-10 23:23 K7ZCZ Note Added: 0008035
2019-06-10 23:45 DOUG Note Added: 0008038
2019-06-11 21:14 DOUG Assigned To DOUG => K7ZCZ
2019-06-15 13:02 WA9PIE Assigned To K7ZCZ => DOUG
2019-06-15 16:32 K7ZCZ Summary Socaro Licener assigns bogus version number to shared memory license structure => Socaro Licenser assigns bogus version number to shared memory license structure
2019-06-23 17:07 DOUG Status assigned => resolved
2019-06-23 17:07 DOUG Resolution open => fixed
2019-06-23 17:07 DOUG Note Added: 0008183
2019-09-14 02:23 WA9PIE Note Added: 0008553
2019-09-22 14:04 DOUG Note Added: 0008576
2019-11-04 03:36 WA9PIE Status resolved => closed
2019-11-04 03:36 WA9PIE Fixed in Version =>
2019-11-04 03:36 WA9PIE Module All => SW License Mgmt
2019-11-04 03:36 WA9PIE Sub-Module (select) => SW License Client
2019-11-04 03:36 WA9PIE Note Added: 0009123
2019-11-04 07:23 K7ZCZ Status closed => new
2019-11-04 07:23 K7ZCZ Resolution fixed => reopened
2019-11-04 07:23 K7ZCZ Note Added: 0009125
2019-11-04 07:29 K7ZCZ Note Added: 0009126
2019-11-08 02:21 WA9PIE Fixed in Version =>
2019-11-08 02:21 WA9PIE Note Added: 0009205
2019-12-05 18:26 WA9PIE Summary Socaro Licenser assigns bogus version number to shared memory license structure => Soraco Licenser assigns bogus version number to shared memory license structure
2020-07-02 02:11 WA9PIE Project 3 - Current Dev List => 2 - Next Dev List (Holding Area)