On 05/03/2017 07:11 AM, Jeong Han Lee wrote:
> Hi,
>
> Please look at db_access.patch, and let me know what you think.
>
> LAST_TYPE should be DBF_NO_ACCESS instead of DBF_DOUBLE, is it right?
The present definition looks correct to me. It did confuse me for a
moment until I noticed the '<='
> #define VALID_DB_FIELD(x) ((x >= 0) && (x <= LAST_TYPE))
And similarly in dbf_type_is_valid().
It's actually not apparent to me that 'DBF_NO_ACCESS' can have any valid
use. Other than appearing in dbf_text[] it doesn't seem to do anything.
And hey, what do you know. RSRV isn't bounds checking the requested DBR
type code in event_add_action(), read_notify_action(), or read_action().
It uses the dbr_size_n() macro which doesn't bounds check it's first
argument, or look for overflow.
...
> I didn't commit my change anywhere, so I just generated the
> db_access.patch via
...
> I just execute the following command (got from Michael)
> $ git format-patch -k -1
I should have mentioned that this command is only useful after you commit.
- Replies:
- Re: Database Field type in db_access.h Jeong Han Lee
- References:
- Database Field type in db_access.h Jeong Han Lee
- Navigate by Date:
- Prev:
Database Field type in db_access.h Jeong Han Lee
- Next:
Re: Database Field type in db_access.h Jeong Han Lee
- Index:
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:
Database Field type in db_access.h Jeong Han Lee
- Next:
Re: Database Field type in db_access.h Jeong Han Lee
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|