Commit Graph

9 Commits

Author SHA1 Message Date
Hiltjo Posthuma
81533f966e util: dial: no need for a static struct hints 2021-05-06 01:16:13 +02:00
Hiltjo Posthuma
b188c78432 util: fix a shadowed variable name srv 2021-05-06 01:14:21 +02:00
Hiltjo Posthuma
d9bda20849 fix undefined behaviour of using isspace ctype function
cast all ctype(3) functions argument to (unsigned char) to avoid UB

POSIX says:
"The c argument is an int, the value of which the application shall ensure is a
character representable as an unsigned char or equal to the value of the macro
EOF. If the argument has any other value, the behavior is undefined."

Many libc cast implicitly the value, but NetBSD for example does not, which is
probably the correct thing to interpret it.
2021-05-06 01:09:21 +02:00
Hiltjo Posthuma
df4c061136 fix an out-of-bounds read if the input is ""
Notified by Guilherme Janczak <guilherme.janczak@yandex.com>, thanks!
2021-05-06 01:04:35 +02:00
Anselm R Garbe
9bb34de449 added Joerg Jung's pledge patch 2017-03-18 19:24:55 +01:00
Anselm R Garbe
16c1c2df60 fixed a silly bug, reported by several people, including Mark Edgar 2013-08-02 22:20:48 +02:00
Anselm R Garbe
6af1b812ae cleanup 2010-05-14 18:01:20 +01:00
Anselm R Garbe
75d42255f2 applied anonymous cleanup patch, thanks anonymous! 2010-04-17 11:12:54 +01:00
Anselm R Garbe
1a4256ef71 merged kris' changes into mainstream sic 2009-11-28 12:16:35 +00:00