Skip to content

Faulty DATETIME ticksSinceMidnight overflow check #2124

@Marcono1234

Description

@Marcono1234

Driver version

4ff4e7e

Problem description

The Integer.MAX_VALUE < ticksSinceMidnight check here is faulty:

if (8 != decryptedValue.length || Integer.MAX_VALUE < ticksSinceMidnight) {

ticksSinceMidnight is an int, so it cannot be > Integer.MAX_VALUE. Maybe the solution here is to change ticksSinceMidnight to long (and adjust the calculation from * 10 to * 10L to avoid overflow there).

I am not familiar with this code though and am not planning to submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions