BIND 10 #1313: writeUint32 and readUint32 are needed
BIND 10 Development
do-not-reply at isc.org
Wed Oct 19 09:04:34 UTC 2011
#1313: writeUint32 and readUint32 are needed
-------------------------------------+-------------------------------------
Reporter: tomek | Owner: UnAssigned
Type: | Status: reviewing
enhancement | Milestone: DHCP 2011
Priority: major | Resolution:
Component: dhcp | Sensitive: 0
Keywords: | Sub-Project: DHCP
Defect Severity: N/A | Estimated Difficulty: 0
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Not fully looked at it (or probably I'm not supposed to look at it)
but just happened to notice this, so I'll make some comments anyway...
IMO the writeXXX interface is very dangerous to use in that it
accepts a bare pointer without any information of the valid size
of the range. While it might look relatively safer due to the
fact that the modified size is fixed, and while it's true even if
we pass the valid range a buggy/evil caller could still cause a
disaster, IMO this type of dangerous interfaces shouldn't be used in
higher level code such as protocol handling.
We have much safer abstraction of buffers:
isc::util::Input/OutputBuffer. I strongly suggest using the safer
interfaces. (And I actually plan to open a ticket to deprecate the
dangerous ones).
--
Ticket URL: <http://bind10.isc.org/ticket/1313#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list