Experimental Physics and Industrial Control System
Hello -
There is a bug in 3.13.1 base/src/gdd/dbMapper.cc where a 40 char string
is copied into a string with space for only 26 chars (enums).
The latest VMS C++ compiler complains about this - it was not causing
any apparent problem on my system. It would be nice if it was fixed in
future versions.
This (and the copy in the opposite direction) is in four places:
strncpy(&(db->strs[i][0]),str[i].fixed_string,
sizeof(aitFixedString));
db->strs[i][sizeof(aitFixedString)-1u] = '\0';
I changed it to:
strncpy(&(db->strs[i][0]),str[i].fixed_string,
MAX_ENUM_STRING_SIZE);
db->strs[i][MAX_ENUM_STRING_SIZE-1u] = '\0';
since db is a dbr_gr_enum which sizes strings by MAX_ENUM_STRING_SIZE
which is 26 whereas sizeof(aitFixedString) is 40.
Stephanie Allison
- Navigate by Date:
- Prev:
FW: comp.os.vxworks newsdigest Jeff Hill
- Next:
RE: alarm handler Jeff Hill
- Index:
1994
1995
1996
1997
1998
<1999>
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
FW: comp.os.vxworks newsdigest Jeff Hill
- Next:
RE: base/src/gdd/dbMapper.cc bug Jeff Hill
- Index:
1994
1995
1996
1997
1998
<1999>
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024