]> arthur.barton.de Git - ngircd-alex.git/commit
Silence compiler warning in Init_New_Client()
authorAlexander Barton <alex@barton.de>
Sun, 17 Sep 2023 18:16:35 +0000 (20:16 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 17 Sep 2023 18:16:35 +0000 (20:16 +0200)
commit232c7382ded45775f777567183675c3c1f448807
tree3c2b6331469bbed6dd920cc0da7ef25d64a00a90
parent30ba325ddedb573cfef70e318db1d294c9703b5d
Silence compiler warning in Init_New_Client()

Use strdup() instead of pointless strndup() to fix the following
compiler warning:

client.c: In function ‘Init_New_Client’:
client.c:216:32: warning: ‘strndup’ specified bound 127 exceeds source size 5 [-Wstringop-overread]
  216 |                 client->away = strndup(DEFAULT_AWAY_MSG, CLIENT_AWAY_LEN - 1);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ngircd/client.c