Unless someone objects, I'm going to add epicsStrNLen() to epicsString.h
on the 3.14 branch [2] when I fix a seemingly broken nil test in
camessage.c [1]. I don't know if this can actually cause a crash, but
knowingly calling strlen() on a string which may be missing a nil seems
a recipe for problems at some point.
I'd rather use strlen() directly, but don't have time to fully
investigate portability right now. RTEMS 4.9 has it, windows has it [3]
and the glibc needs POSIX-2008 compatibility [4].
[1]
https://github.com/epics-base/epics-base/blob/3.16/src/ioc/rsrv/camessage.c#L751
[2]
http://bazaar.launchpad.net/~epics-core/epics-base/caserver-id-plugin/revision/12518
[3] https://msdn.microsoft.com/en-us/library/z50ty2zh.aspx
[4] https://linux.die.net/man/3/strnlen
- Replies:
- Re: strnlen? Andrew Johnson
- Navigate by Date:
- Prev:
Re: New OS_CLASS to epics-base Michael Davidsaver
- Next:
Re: strnlen? Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: New OS_CLASS to epics-base Michael Davidsaver
- Next:
Re: strnlen? Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
2025
|