Compare commits

...

1 Commits

Author SHA1 Message Date
silverwizard a1f3d3160f Fixed issue of showing my memory to the world! 5 years ago
  1. 4
      chargen.c

@ -251,7 +251,7 @@ int main(int argc, char **argv)
//rval = sendto(s, "chargen data\r\n", 14, 0, sa, len); //rval = sendto(s, "chargen data\r\n", 14, 0, sa, len);
char character[512]; char character[512];
genChar(character); genChar(character);
rval = sendto(s, character, 512, 0, sa, len); rval = sendto(s, character, strnlen(character,512), 0, sa, len);
if (rval == -1) if (rval == -1)
warn("sendto"); warn("sendto");
} }
@ -288,7 +288,7 @@ int main(int argc, char **argv)
} }
char character[512]; char character[512];
genChar(character); genChar(character);
if (write(s, character, 512) == -1) if (write(s, character, strnlen(character,512)) == -1)
{ {
warn("write"); warn("write");
printf("Closing stream connection\n"); printf("Closing stream connection\n");

Loading…
Cancel
Save