[syslinux] IP details in COM32 module
Coe, Colin C. (Unix Engineer)
Colin.Coe at woodside.com.au
Mon Jun 11 17:18:03 PDT 2007
Hi all
Please ignore my last email, I see where my code was wrong now. I now
see all the DHCP options correctly.
I'll quietly go away now...
CC
> -----Original Message-----
> From: syslinux-bounces at zytor.com
> [mailto:syslinux-bounces at zytor.com] On Behalf Of Luciano Rocha
> Sent: Monday, 11 June 2007 6:40 PM
> To: syslinux at zytor.com
> Subject: Re: [syslinux] IP details in COM32 module
>
> On Mon, Jun 11, 2007 at 06:10:02PM +0800, Coe, Colin C. (Unix
> Engineer) wrote:
> > buff is defined as 'char *buff'.
> >
> > Many thanks for the pointer, the code no longer produces a
> hard hang.
> >
> > I found a few other problems with my code as well. Things
> seem to work better when defined as 'char something[n]'
> rather than 'char *something' but I'm not sure why this would
> be the case.
>
> Yes, things usually go better when you define memory for them.
> char something[n] defines an array of size n (the compiler
> allocates the buffer, usually on the stack). char *something
> defines a pointer to an area of memory. Unless you initialize
> it (like something = malloc(n) or something = some_array), it
> points to a random area of memory, and you're likely to corrupt data.
>
> --
> lfr
> 0/0
>
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
More information about the Syslinux
mailing list