Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer overflow fix #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Buffer overflow fix #1

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 10, 2013

Buffer overflow

  • The incrementation of a byte stored long (timestamp here) must take care of the buffer overflow. Otherwise the tweets will not be found in lots of cases, if any byte of the timestamp is ff.
  • Note that in the event that the code is still used in the year 36,536,598 it will not work any more (long overflow).

The incrementation of a byte stored long (timestamp here) must take care of the buffer overflow.

Note that in the event that the code is still used in the year 36,536,598 it will not work any more (long overflow).
byte[] stopRow = Bytes.padTail(userHash, longLength);
stopRow[Md5Utils.MD5_LENGTH-1]++; // 212d...867000...
// stopRow[bytes1.length - 1]++; // 21 2d...86 ff 00 WRONG
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rugby Online Bookies| Rugby online Bookies | Rugby Bookies Free bonus | Rugby Bookies promotional codes
Rugby Union Online Bet http://www.rugbyleagueonlinebet.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants