This repository was archived by the owner on Sep 19, 2021. It is now read-only.
Conversation
In Uuid, ids are 32 bit unsigned integers. As Java does not supported unsigned integers, when converting to a string, the 32 bit integer is converted to a long so that it can be written to a string as a positive integer (using all 32 bits). When converting from a string to a Uuid, the integer value is not handled correctly as values that would be acceptable as a 32 bit unsigned integer fail to be parsed as a 32 bit signed integer. If the id value of a Uuid is 0xFFFFFFFF and is converted to the string 4294967295. When 4294967295 is parsed, it will fail as it is not expressible as a 32 bit signed integer. Parsing needs to parse the unsigned integer and convert and store the bit pattern correctly in a signed integer. Closes #62
wgenemorgan
approved these changes
Apr 20, 2017
crepricg
approved these changes
Apr 24, 2017
vaage
added a commit
that referenced
this pull request
Apr 26, 2017
* Made Secret into a full class * Simplifying Secret Parse * Relay re-load teams file * Adding missing final statements * Correcting confusing comment * Moved Random Uuid Generator * Fixing Uuid Parse Error (#66)
vaage
added a commit
that referenced
this pull request
May 9, 2017
* Made Secret into a full class * Simplifying Secret Parse * Relay re-load teams file * Adding missing final statements * Correcting confusing comment * Moved Random Uuid Generator * Fixing Uuid Parse Error (#66)
evansenter
added a commit
to Vekktone/codeu_project_2017
that referenced
this pull request
Jun 1, 2017
* upstream/master: Corrected Variable Expansion To Meet Style Guide Requirements (google#86) Fixing Uuid Parse Error (google#66) Moved Random Uuid Generator Fixed Message Response Failed Correcting confusing comment Adding missing final statements Relay re-load teams file Fix Blank Line Fail in Teams File Update README to explain <persistent-dir> Improved messaging of variables in run_server.sh Fixes HEX conversion for secret. Replaces 'or' with 'and'. Adding specification for the secret server to be an hex string. README update with new cmdline arguments Adding a path for persistent data Changing How The Relay Processes Reads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Uuid, ids are 32 bit unsigned integers. As Java does not supported
unsigned integers, when converting to a string, the 32 bit integer is
converted to a long so that it can be written to a string as a
positive integer (using all 32 bits).
When converting from a string to a Uuid, the integer value is not
handled correctly as values that would be acceptable as a 32 bit
unsigned integer fail to be parsed as a 32 bit signed integer.
If the id value of a Uuid is 0xFFFFFFFF and is converted to the string
4294967295. When 4294967295 is parsed, it will fail as it is not
expressible as a 32 bit signed integer.
Parsing needs to parse the unsigned integer and convert and store the
bit pattern correctly in a signed integer.
Closes #62