diff options
Diffstat (limited to 'src/appl/simple/server/sim_server.c')
-rw-r--r-- | src/appl/simple/server/sim_server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c index 551a4f3..255d786 100644 --- a/src/appl/simple/server/sim_server.c +++ b/src/appl/simple/server/sim_server.c @@ -151,7 +151,7 @@ char *argv[]; fprintf(stderr, "%s: host unknown\n", full_hname); exit(1); } - memcpy((char *)&s_sock.sin_addr, host->h_addr, host->h_length); + memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr)); /* Open socket */ if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { |