Fix #193 (use RtlMoveMemory instead of msvcrt.memcpy) #230

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@akx
Contributor
akx commented Oct 25, 2013

This short patch seems to fix the illegal call of msvcrt.memcpy that was introduced between 1.10.1 and 1.11 by replacing it with the underlying kernel32.RtlMoveMemory call.

In addition, a little bit of sanity checking is added to make sure writes aren't out of bounds.

Refs paramiko/paramiko#193.

Test case

This throws an exception on 1.11.0 and subsequent versions, doesn't with this patch applied.

from paramiko.agent import Agent
for key in Agent().get_keys():
    print key.get_name(), key.get_base64()
@bitprophet
Member

Cherry-picked, plz see #193 for more :)

@bitprophet bitprophet closed this Jan 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment