Fixed issue of showing my memory to the world!

remotes/1696626127234162117/tmp_refs/heads/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); //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