vysheng / tg

telegram-cli
GNU General Public License v2.0
6.49k stars 1.54k forks source link

write used the wrong char count (different variant of #1766) #1794

Open hg42 opened 1 year ago

hg42 commented 1 year ago

fixes this error:

main.c:824:7: error: ‘write’ reading 18 bytes from a region of size 17 [-Werror=stringop-overread] 824 | if (write (1, "SIGNAL received\n", 18) < 0) {

the string is 16 chars long (including the \n but excluding the \0, which is counted in the error message)