In subscription.h Limit timeout is defined float, I believe it should be uint64_t

Bug #1475888 reported by gokhanettin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grail
Fix Released
Medium
Stephen M. Webb

Bug Description

Browsing the code online, I noticed
in subscription.h line 35 timeout is of type float.
  struct Limit {
    float timeout;
    float threshold;
  };

In subscription.cpp line 107 value is cast to uint64_t and drag_timeout is set as uint64_t
   case UGSubscriptionPropertyDragTimeout: {
      uint64_t timeout = *reinterpret_cast<const uint64_t*>(value);
      if (timeout < 0)
        return UGStatusErrorInvalidValue;
      drag_.timeout = timeout;
      return UGStatusSuccess;
    }

Related branches

Stephen M. Webb (bregma)
Changed in grail:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Stephen M. Webb (bregma)
milestone: none → 3.1.1
Stephen M. Webb (bregma)
Changed in grail:
status: Triaged → In Progress
Stephen M. Webb (bregma)
Changed in grail:
status: In Progress → Fix Committed
Stephen M. Webb (bregma)
Changed in grail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.