31 Aug
2005
31 Aug
'05
4:19 p.m.
looks like you beat me to it ;) Steve On Aug 31, 2005, at 1:09 PM, Alan DeKok wrote:
Frank Cusack <fcusack@fcusack.com> wrote:
Forcing unsigned char would be a mistake, IMHO. I personally think casts are good. One man's ugly notation is another man's inline documentation.
The casts hilight API incompatibilities, and potential security issues.
Maybe since we're doing massive re-writes anyhow, we could have:
VALUE_PAIR { union { char strvalue[]; uint8_t octets[]; ... } data; }
And then use the "right" data member to access the data. "uint8_t" shouldn't be passed to "strcpy", especially if we're using "uint8_t" as "opaque data".
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/ devel.html