forked from mirrors/tftp-hpa-google
Compare commits
No commits in common. "1dd16bc0df85f556db194168cd6e37f2d892b927" and "2c86ff58dcc003107b47f2d35aa0fdc4a3fd95e1" have entirely different histories.
1dd16bc0df
...
2c86ff58dc
2 changed files with 6 additions and 8 deletions
|
@ -806,7 +806,6 @@ static void command(void)
|
|||
exit(0); /* EOF */
|
||||
#else
|
||||
fputs(prompt, stdout);
|
||||
fflush(stdout);
|
||||
if (fgets(line, LBUFLEN, stdin) == 0) {
|
||||
if (feof(stdin)) {
|
||||
exit(0);
|
||||
|
|
13
tftp/tftp.c
13
tftp/tftp.c
|
@ -278,16 +278,15 @@ makerequest(int request, const char *name,
|
|||
struct tftphdr *tp, const char *mode)
|
||||
{
|
||||
char *cp;
|
||||
size_t len;
|
||||
|
||||
tp->th_opcode = htons((u_short) request);
|
||||
cp = (char *)&(tp->th_stuff);
|
||||
len = strlen(name) + 1;
|
||||
memcpy(cp, name, len);
|
||||
cp += len;
|
||||
len = strlen(mode) + 1;
|
||||
memcpy(cp, mode, len);
|
||||
cp += len;
|
||||
strcpy(cp, name);
|
||||
cp += strlen(name);
|
||||
*cp++ = '\0';
|
||||
strcpy(cp, mode);
|
||||
cp += strlen(mode);
|
||||
*cp++ = '\0';
|
||||
return (cp - (char *)tp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue