On Mon, 26 Dec 2005 10:34:28 -0600
Harley D. Eades III <"Harley D. Eades III" <[EMAIL PROTECTED]>> wrote:

 | What is the difference between what I have and a PED_ASSERT? All the
 | PED_ASSERT will do is return if pth is NULL, right?  The function as is
 | will not free anything unless there is memory, which is in my mind
 | correct.
The problem is the crash that will occur when you dereference the pointer in

  if (pth->Reserved2)

If pth is NULL, for which you check afterwards (never reached in this case!),
the program will crash.

As for the assertion, it will throw a fatal exception if it is not fullfilled
instead of just returning.

HTH,

~ Leslie

-- 
PGP-KID: 0x52D70289

Attachment: pgpUSLWEuLT7x.pgp
Description: PGP signature

_______________________________________________
Bug-parted mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-parted

Reply via email to