Integer overflow bug in fastfilereader and offset parameter to stream a file by mayanks · Pull Request #533 · eventmachine/eventmachine · GitHub
Skip to content

Integer overflow bug in fastfilereader and offset parameter to stream a file#533

Open
mayanks wants to merge 3 commits into
eventmachine:masterfrom
mayanks:master
Open

Integer overflow bug in fastfilereader and offset parameter to stream a file#533
mayanks wants to merge 3 commits into
eventmachine:masterfrom
mayanks:master

Conversation

@mayanks

@mayanks mayanks commented Sep 18, 2014

Copy link
Copy Markdown

Nothing too fancy. Just had a requirement to stream a file from a certain offset (in case the file was not streamed completely last time). So went ahead and added this feature in the eventmachine.

Please accept this pull request if you feel it is a good feature to have.

@mayanks mayanks changed the title offset parameter to stream a file Integer overflow bug in fastfilereader and offset parameter to stream a file Sep 26, 2014
@mayanks

mayanks commented Sep 26, 2014

Copy link
Copy Markdown
Author

@sodabrew

Copy link
Copy Markdown
Member

Looks reasonable - please rebase the PR, and squash to 2 commits: one for the int/long fixes, the other for the new offset feature.

Comment thread ext/cmain.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mind the tabs, not spaces.

@sodabrew

Copy link
Copy Markdown
Member

Hi - I noticed the added commits, but I don't think it came out as intended. You might have rebased locally, then done a 'git pull' and merged origin/master back into your local master before you pushed? The trick with a rebase is that you must force-push once you have the commits on your local branch organized as you wish, so that the origin matches local.

@mayanks

mayanks commented Jan 25, 2015

Copy link
Copy Markdown
Author

I should have commented that I messed this whole rebase business. I'll try and clean this up again. If I am not able to clean it, I'll submit a fresh pull request. I hope that should be fine.

Fixed bug in reading file greater than 2GB in size

converted INT to LONG to support >2GB file size

converted to NUM to LONG

sorry, my bad. used wrong macro

yet another overflow when adding start and offset

updated the function definition

converted to long to unsigned long
@mayanks

mayanks commented Jan 25, 2015

Copy link
Copy Markdown
Author

Hi Aaron, after some hiccups and doing multiple reverts, I finally managed to clean the commit tree (and learned some new git tricks).

Do let me know if this looks good. Thanks for your patience.

@sodabrew

Copy link
Copy Markdown
Member

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.

2 participants