diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | scp.c | 6 |
2 files changed, 7 insertions, 5 deletions
@@ -3,6 +3,10 @@ | |||
3 | - deraadt@cvs.openbsd.org 2005/03/31 18:39:21 | 3 | - deraadt@cvs.openbsd.org 2005/03/31 18:39:21 |
4 | [scp.c] | 4 | [scp.c] |
5 | copy argv[] element instead of smashing the one that ps will see; ok otto | 5 | copy argv[] element instead of smashing the one that ps will see; ok otto |
6 | - djm@cvs.openbsd.org 2005/04/02 12:41:16 | ||
7 | [scp.c] | ||
8 | since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror | ||
9 | build | ||
6 | 10 | ||
7 | 20050331 | 11 | 20050331 |
8 | - (dtucker) OpenBSD CVS Sync | 12 | - (dtucker) OpenBSD CVS Sync |
@@ -2414,4 +2418,4 @@ | |||
2414 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 2418 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
2415 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 2419 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
2416 | 2420 | ||
2417 | $Id: ChangeLog,v 1.3735 2005/04/03 00:16:11 djm Exp $ | 2421 | $Id: ChangeLog,v 1.3736 2005/04/03 00:16:39 djm Exp $ |
@@ -71,7 +71,7 @@ | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #include "includes.h" | 73 | #include "includes.h" |
74 | RCSID("$OpenBSD: scp.c,v 1.120 2005/03/31 18:39:21 deraadt Exp $"); | 74 | RCSID("$OpenBSD: scp.c,v 1.121 2005/04/02 12:41:16 djm Exp $"); |
75 | 75 | ||
76 | #include "xmalloc.h" | 76 | #include "xmalloc.h" |
77 | #include "atomicio.h" | 77 | #include "atomicio.h" |
@@ -367,9 +367,7 @@ toremote(char *targ, int argc, char **argv) | |||
367 | if (*targ == 0) | 367 | if (*targ == 0) |
368 | targ = "."; | 368 | targ = "."; |
369 | 369 | ||
370 | arg = strdup(argv[argc - 1]); | 370 | arg = xstrdup(argv[argc - 1]); |
371 | if (!arg) | ||
372 | err(1, "malloc"); | ||
373 | if ((thost = strrchr(arg, '@'))) { | 371 | if ((thost = strrchr(arg, '@'))) { |
374 | /* user@host */ | 372 | /* user@host */ |
375 | *thost++ = 0; | 373 | *thost++ = 0; |