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

tube.recvxxxx does not check self.buffer #131

Closed
zachriggle opened this issue Sep 23, 2014 · 2 comments
Closed

tube.recvxxxx does not check self.buffer #131

zachriggle opened this issue Sep 23, 2014 · 2 comments
Labels

Comments

@zachriggle
Copy link
Member

None of the recvxxxx routines check self.buffer before calling self._recv which skips the fast-return path in self.recv (which does check self.buffer).

@TethysSvensson
Copy link
Contributor

As far as I can see, they do. Can you give me an example of them not doing it?

@zachriggle
Copy link
Member Author

Was reading the _recv code incorrectly, my mistake.

    def _recv(self, numb = 4096, timeout = 'default'):
        """_recv(numb = 4096, timeout = 'default') -> str

        Recieves one chunk of from the internal buffer or from the OS if the
        buffer is empty.
        """
        # If there is already data, go with that
        if self.buffer:
            data = self.buffer.pop()
        else: # <-- Zach's brain says to ignore this
            if timeout == 'default':

Kyle-Kyle pushed a commit to Kyle-Kyle/pwntools that referenced this issue Apr 25, 2021
Also moved workaround from Gallopsled#117 to common place - gdbinit.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants