User: Password:
Subscribe / Log in / New account

Critical Vulnerabilities in Samba

Critical Vulnerabilities in Samba

Posted May 17, 2007 11:36 UTC (Thu) by ms (subscriber, #41272)
Parent article: Critical Vulnerabilities in Samba

When will people learn to use programming languages that do not overload types? Null is not an Integer, it is not an address. It is an extra hacked on value. The actual type that should be used Maybe Integer (to use Haskell types). If you use that then you're forced to deal with the possibility of the failure up-front, thus such problems go away.

I recommend Tim Sweeney's slides for an interesting perspective on these problems.

(Log in to post comments)

Overloaded types in Samba

Posted May 21, 2007 15:34 UTC (Mon) by rfunk (subscriber, #4054) [Link]

Isn't "Maybe Integer" just another way of overloading types? Seems to me that the result
is the same either way, at least in the case where NULL is returned instead of a pointer
(since a valid pointer never equals NULL).

Overloaded types in Samba

Posted May 24, 2007 7:04 UTC (Thu) by roy_hu (guest, #43193) [Link]

In Haskell, the Maybe type is defined as
data Maybe a = Nothing | Just a

So if you're given something of Maybe Integer type, you have to pattern match it with the two constructors in order to get the integer value out of it.

I think his point is that you have to deal with failure upfront; you cannot ignore it.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds