Fixed issue of showing my memory to the world!

master
silverwizard 5 years ago
parent aef524d8ce
commit a1f3d3160f
  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);
char character[512];
genChar(character);
rval = sendto(s, character, 512, 0, sa, len);
rval = sendto(s, character, strnlen(character,512), 0, sa, len);
if (rval == -1)
warn("sendto");
}
@ -288,7 +288,7 @@ int main(int argc, char **argv)
}
char character[512];
genChar(character);
if (write(s, character, 512) == -1)
if (write(s, character, strnlen(character,512)) == -1)
{
warn("write");
printf("Closing stream connection\n");

Loading…
Cancel
Save