agent: win32: fix bad _libssh2_store_str call
As pointed out by Grubsky Grigory <g.grubsky@securitycode.ru>, I made a mistake when I added the _libssh2_store_str() call before and I made a slightly different patch than what he suggested. Based purely on taste.
Этот коммит содержится в:
родитель
ed526a0e24
Коммит
76fd96e63e
@ -268,6 +268,7 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
|
|||||||
char mapname[23];
|
char mapname[23];
|
||||||
HANDLE filemap;
|
HANDLE filemap;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
unsigned char *p2;
|
||||||
int id;
|
int id;
|
||||||
COPYDATASTRUCT cds;
|
COPYDATASTRUCT cds;
|
||||||
|
|
||||||
@ -284,8 +285,8 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
|
|||||||
if (filemap == NULL || filemap == INVALID_HANDLE_VALUE) {
|
if (filemap == NULL || filemap == INVALID_HANDLE_VALUE) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0);
|
p2 = p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0);
|
||||||
_libssh2_store_str(p, transctx->request, transctx->request_len);
|
_libssh2_store_str(&p2, transctx->request, transctx->request_len);
|
||||||
|
|
||||||
cds.dwData = PAGEANT_COPYDATA_ID;
|
cds.dwData = PAGEANT_COPYDATA_ID;
|
||||||
cds.cbData = 1 + strlen(mapname);
|
cds.cbData = 1 + strlen(mapname);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user