Unix Programming - freeing memory leads to sig fault

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2007 > freeing memory leads to sig fault





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author freeing memory leads to sig fault
Ryan Knopp

2007-11-17, 1:27 am

I can't seem to figure out why this is happening. I even tried to use
gdb but it seems it should work. I've commented below where this is
happening

Here's a snippet.

int main()
{
/* random stuff */

while(1)
{
char mesg[1024];
n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
if(n > 0)
{
tmp = parsepacket(mesg);
}
}
}
struct tibo *parsepacket(char packet[])
{
struct tibo *tmp = (struct tibo *)malloc(sizeof(struct tibo));
char **parsed;
char **tmp2;

parsed = nl_to_str(packet);
tmp2 = parsed;
while(*parsed != '\0')
{
if(strncmp("machine", *parsed, 7) == 0)
{
tmp->machine = &parsed[0][8];
parsed[0][7] = '\0';
}
parsed++;
}
/* I tried using the below while loop initially but it failed on the
first iteration. so i just tried to just free tmp2[0] but that failed.
Even trying to free just tmp2 itself fails. Not sure why. */
while(*tmp2 != '\0')
{
free(*tmp2);
tmp2++;
}
free(*tmp2);
return tmp;
}
/* newline to string and string is converted to lowercase */
char **nl_to_str(char packet[])
{
int i, count = 0, j = 0;
char **str;

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
count++;

str = (char **)malloc(count * sizeof(char *));
str[0] = &packet[0];

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
{
packet[i] = '\0';
str[j++] = &packet[i+1];
} else
packet[i] = tolower(packet[i]);

str[j] = '\0';
return str;
}

Thanks in advance
Ryan
Joachim Schmitz

2007-11-17, 7:37 am

"Ryan Knopp" <ryan--removethis--@theknopps.com> schrieb im Newsbeitrag
news:13jt4q9a7fkpc92@corp.supernews.com...
>I can't seem to figure out why this is happening. I even tried to use gdb
>but it seems it should work. I've commented below where this is happening
>
> Here's a snippet.
>
> int main()
> {
> /* random stuff */
>
> while(1)
> {
> char mesg[1024];
> n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
> if(n > 0)
> {
> tmp = parsepacket(mesg);
> }
> }
> }
> struct tibo *parsepacket(char packet[])
> {
> struct tibo *tmp = (struct tibo *)malloc(sizeof(struct tibo));

Loose the case.

> char **parsed;
> char **tmp2;
>
> parsed = nl_to_str(packet);
> tmp2 = parsed;
> while(*parsed != '\0')
> {
> if(strncmp("machine", *parsed, 7) == 0)
> {
> tmp->machine = &parsed[0][8];
> parsed[0][7] = '\0';
> }
> parsed++;
> }
> /* I tried using the below while loop initially but it failed on the
> first iteration. so i just tried to just free tmp2[0] but that failed.
> Even trying to free just tmp2 itself fails. Not sure why. */
> while(*tmp2 != '\0')
> {
> free(*tmp2);

you malloc()ed the memory pointed to be tmp, but free() temp2...
free() only takes what malloc() gave.
You malloc()ed only once, but free() in a loop...

> tmp2++;
> }
> free(*tmp2);
> return tmp;
> }
> /* newline to string and string is converted to lowercase */
> char **nl_to_str(char packet[])
> {
> int i, count = 0, j = 0;
> char **str;
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> count++;
>
> str = (char **)malloc(count * sizeof(char *));
> str[0] = &packet[0];
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> {
> packet[i] = '\0';
> str[j++] = &packet[i+1];
> } else
> packet[i] = tolower(packet[i]);
>
> str[j] = '\0';
> return str;
> }
>
> Thanks in advance
> Ryan


Bye, Jojo


Joachim Schmitz

2007-11-17, 7:37 am

"Joachim Schmitz" <nospam.jojo@schmitz-digital.de> schrieb im Newsbeitrag
news:fhmbs3$mq9$1@online.de...
> "Ryan Knopp" <ryan--removethis--@theknopps.com> schrieb im Newsbeitrag
> news:13jt4q9a7fkpc92@corp.supernews.com...
> Loose the case.

"cast" I meant... also check whether malloc succeeded

>
> you malloc()ed the memory pointed to be tmp, but free() temp2...
> free() only takes what malloc() gave.
> You malloc()ed only once, but free() in a loop...

Hmm I didn't read properly, here you try to free what you malloced in
nl_to_str()
free(tmp2);
[vbcol=seagreen]
However, her you should free(tmp)
[vbcol=seagreen]
and not return that now invald value to the caller
[vbcol=seagreen]

Bye, Jojo


Ryan Knopp

2007-11-17, 7:26 pm

Okay so let me ask a noob C question then.

If i have this kind of sudo codeish as i didn't compile it.

main()
{
char *ug;

ug = dosomething();
free(ug);

/* shouldn't this free ug? ug is pointing to what i created in
dosomething with malloc*/

}
char *dosomething(void)
{
char *str;
str = malloc(100 * sizeof(char *));

return str;

}
Eric Sosman

2007-11-17, 7:26 pm

Ryan Knopp wrote:
> Okay so let me ask a noob C question then.
>
> If i have this kind of sudo codeish as i didn't compile it.


For future reference, the word is "pseudocode," the
prefix "pseudo" meaning "false" or "sham." It comes to
English from Greek, which is why the initial p isn't
psounded.

(Why be picky? Because in Unix-land "sudo" is the
name of a widely-used program that allows authorized people
to run some commands with super-user privileges. When I
read that a "noob" was messing around with "sudo" I began
to wonder just how many of your feet had been shot off ...)

> main()
> {
> char *ug;
>
> ug = dosomething();
> free(ug);
>
> /* shouldn't this free ug? ug is pointing to what i created in
> dosomething with malloc*/


It would free the memory that `ug' pointed to; the pointer
variable `ug' stays around. (And is useless until you assign
it some other value, because its old value is trying to point
to the freed memory, which may get recycled for other purposes
at any moment.)

Notice the "would," which is the subjunctive indicating a
situation contrary to fact. The code won't compile, because
at the point where you call dosomething() the function has not
yet been declared. C therefore assumes that it returns an `int',
and sees that you're trying to assign an `int' value to a `char*'
variable. That's not permitted, so you'll get a diagnostic. So
by "would," I mean the memory would be freed if you fixed that
problem and ran the fixed program.

(The hiding of irrelevant details is both a strength and a
weakness of pseudocode. The problem for the reader is to try
to figure out which details are omitted on purpose and which are
omitted because the writer was unaware of them ... The code you
posted at the start of the thread has the same problem, so it's
possible you're unaware of it; better safe than sorry.)

> }
> char *dosomething(void)
> {
> char *str;
> str = malloc(100 * sizeof(char *));


The size calculation is suspect: You appear to be allocating
memory that will hold `char' objects -- because you're pointing
at it with a `char*' -- but the amount requested is enough for
a hundred pointers, not a hundred characters. You probably want
`sizeof(char)' rather than `sizeof(char*)', or just make use of
the fact that a char is one byte by definition and omit the
multiplication entirely. Another way of writing allocations
that is about as bullet-proof as one can get is

str = malloc(100 * sizeof *str)

.... which lets the compiler figure out the proper size for you
and eliminates many opportunities for errer.

(Yes, I know, "pseudocode," but as I mentioned earlier ...)

> return str;
>
> }


--
Eric Sosman
esosman@ieee-dot-org.invalid
fjblurt@yahoo.com

2007-11-17, 7:26 pm

On Nov 16, 11:07 pm, Ryan Knopp <ryan--removethi...@theknopps.com>
wrote:
> I can't seem to figure out why this is happening. I even tried to use
> gdb but it seems it should work. I've commented below where this is
> happening
>
> Here's a snippet.
>
> int main()
> {
> /* random stuff */
>
> while(1)
> {
> char mesg[1024];
> n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
> if(n > 0)
> {
> tmp = parsepacket(mesg);
> }
> }}
>
> struct tibo *parsepacket(char packet[])
> {
> struct tibo *tmp = (struct tibo *)malloc(sizeof(struct tibo));
> char **parsed;
> char **tmp2;
>
> parsed = nl_to_str(packet);
> tmp2 = parsed;
> while(*parsed != '\0')
> {
> if(strncmp("machine", *parsed, 7) == 0)
> {
> tmp->machine = &parsed[0][8];
> parsed[0][7] = '\0';
> }
> parsed++;
> }
> /* I tried using the below while loop initially but it failed on the
> first iteration. so i just tried to just free tmp2[0] but that failed.
> Even trying to free just tmp2 itself fails. Not sure why. */


tmp2 holds the return value from nl_to_str. tmp2 itself was allocated
with malloc, but the pointers it points to were not. Instead they are
pointers that point inside the 'packet' array. Thus it is an error to
free *tmp2.

> while(*tmp2 != '\0')
> {
> free(*tmp2);
> tmp2++;
> }
> free(*tmp2);
> return tmp;}
>
> /* newline to string and string is converted to lowercase */
> char **nl_to_str(char packet[])
> {
> int i, count = 0, j = 0;
> char **str;
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> count++;
>
> str = (char **)malloc(count * sizeof(char *));


This should be (count+2). One entry per newline in the packet, one
more if the last entry doesn't end with a newline, and one more for
the NULL at the end.

> str[0] = &packet[0];
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> {
> packet[i] = '\0';
> str[j++] = &packet[i+1];


I think you mean str[++j]. str[0] got assigned outside the loop, so
this should assign str[1] when it hits the first newline.

Notice, in any case, that str[j] does *not* come from malloc.

> } else
> packet[i] = tolower(packet[i]);
>
> str[j] = '\0';


It would be less confusing to use NULL instead of '\0', since str[j]
is a pointer, not a char. But it's not wrong.

> return str;
>
> }
>
> Thanks in advance
> Ryan


Wayne C. Morris

2007-11-17, 7:26 pm

In article <13jt4q9a7fkpc92@corp.supernews.com>,
Ryan Knopp <ryan--removethis--@theknopps.com> wrote:

> I can't seem to figure out why this is happening. I even tried to use
> gdb but it seems it should work. I've commented below where this is
> happening
>
> Here's a snippet.
>
> int main()
> {
> /* random stuff */
>
> while(1)
> {
> char mesg[1024];
> n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
> if(n > 0)
> {


recvfrom() doesn't zero-terminate the data. You treat it as a zero-
terminated string in nl_to_str(), so you'll have to make sure it is:

char mesg[1024+1];
n = recvfrom(lnd, mesg, sizeof(mesg)-1, 0,
(struct sockaddr *)&cliaddr, &len);
if(n > 0)
{
mesg[n] = '\0'; /* zero-terminate the message */

It's also possible for recvfrom() to return less than the amount of data
requested, so you might need a loop to keep reading until you have the
whole packet before you parse it. 'man recvfrom' for details.


> tmp = parsepacket(mesg);
> }
> }
> }
> struct tibo *parsepacket(char packet[])
> {
> struct tibo *tmp = (struct tibo *)malloc(sizeof(struct tibo));
> char **parsed;
> char **tmp2;
>
> parsed = nl_to_str(packet);
> tmp2 = parsed;
> while(*parsed != '\0')


*parsed is a (char*), not a (char). You should be comparing to NULL.


> {
> if(strncmp("machine", *parsed, 7) == 0)
> {
> tmp->machine = &parsed[0][8];
> parsed[0][7] = '\0';
> }
> parsed++;
> }
> /* I tried using the below while loop initially but it failed on the
> first iteration. so i just tried to just free tmp2[0] but that failed.
> Even trying to free just tmp2 itself fails. Not sure why. */
> while(*tmp2 != '\0')


Same problem, but you don't need this loop anyway.

> {
> free(*tmp2);
> tmp2++;
> }
> free(*tmp2);


tmp2 points to an array of pointers which was allocated in nl_to_str
when it called malloc. You *should* be able to free that memory here by
calling free(tmp2).

The elements of that array point into mesg[], not at malloc'ed memory
blocks, so you should NOT attempt to free them. Eliminate the entire
loop and just call free(tmp2).


> return tmp;
> }
> /* newline to string and string is converted to lowercase */
> char **nl_to_str(char packet[])
> {
> int i, count = 0, j = 0;
> char **str;
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> count++;
>
> str = (char **)malloc(count * sizeof(char *));


That should be either (count+1) or (count+2). You have to add one for
the extra value you're going to store in str[j] at the end of the next
loop, and another +1 if it's possible for the message packet to end in
something other than '\n' (not counting the terminating '\0').


> str[0] = &packet[0];
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> {
> packet[i] = '\0';
> str[j++] = &packet[i+1];


The first time through the loop, j is still 0, so it'll overwrite the
value that you stored in str[0] before entering the loop. Is that what
you intended?

> } else
> packet[i] = tolower(packet[i]);
>
> str[j] = '\0';


str[j] is a (char*), not a (char). You should be setting it to NULL.
Wayne C. Morris

2007-11-17, 7:26 pm

In article <fhmcs0$o69$1@online.de>,
"Joachim Schmitz" <nospam.jojo@schmitz-digital.de> wrote:

[...][vbcol=seagreen]
> However, her you should free(tmp)
>
> and not return that now invald value to the caller


No, he should NOT free(tmp). If he doesn't free it, it'll still be
valid and he can return it to the caller.

Of course, the caller will have to free it at some point, but I assume
he knows that. it was clear that he didn't post the full code for his
main() function.
Wayne C. Morris

2007-11-17, 7:26 pm

In article <oZOdnW94DZ1cwqLanZ2dnUVZ_h-vnZ2d@comcast.com>,
Eric Sosman <esosman@ieee-dot-org.invalid> wrote:

>
> The size calculation is suspect: You appear to be allocating
> memory that will hold `char' objects -- because you're pointing
> at it with a `char*' -- but the amount requested is enough for
> a hundred pointers, not a hundred characters.


Nope, see the nl_to_str() function in his first post. His intention is
to allocate space to hold a bunch of pointers.
Ryan Knopp

2007-11-18, 1:35 am

So I updated my code and malloc everything so I can free it. But it's
still failing at that same point. I commented some of the code below.


struct tibo
{
char *identity;
char *machine;
char *ip;
char *port;
};
int main()
{

while(1)
{
char *mesg = malloc(1024 * sizeof(char));
if(mesg == NULL)
exit(0);

n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
if(n > 0)
{
mesg[n] = '\0';
inet_ntop(AF_INET, &((struct sockaddr_in
*)&cliaddr)->sin_addr.s_addr, ip, sizeof(ip));

printf("%s", tmp->machine);
}

exit(1);
}
}
struct tibo *parsepacket(char *packet)
{
struct tibo *tmp = malloc(sizeof(struct tibo));
char **parsed;
char **tmp2;

if(tmp == 0)
exit(0)

parsed = nl_to_str(packet);
tmp2 = parsed;

/* commented this out to figure out why tmp2 won't free.
while(*parsed != NULL)
{
if(strncmp("machine", *parsed, 7) == 0)
{
tmp->machine = &parsed[0][8];
parsed[0][7] = '\0';
}
else if(strncmp("identity", *parsed, 8) == 0)
{
tmp->identity = &parsed[0][9];
parsed[0][8] = '\0';
}
else if(strncmp("services", *parsed, 8) == 0)
printf("blah\n");

parsed++;
}*/


free(tmp2);
/* this still errors out (glibc point error message now), even though I
can't figure out why. I malloc all my variables now including packet.
Since everything is malloc shouldn't i be able to free it? All i get
is the glibc pointer error messages. All memory seems to be allocated.

In theory when this function finishes I want everything freed and return
tmp which is a struct tibo, which I added to the code


*/

return tmp;
}
/* newline to string and string is converted to lowercase */
char **nl_to_str(char *packet)
{
int i, count = 0, j = 0;
char **str;

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
count++;

str = malloc(count+1 * sizeof(char *));
if(str == NULL)
exit(0)

str[0] = &packet[0];

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
{
packet[i] = '\0';
str[++j] = &packet[i+1];
} else
packet[i] = tolower(packet[i]);

str[j] = NULL;

return str;
}

Thanks again for all your help
Ryan
moi

2007-11-18, 7:45 am

On Sat, 17 Nov 2007 18:04:58 -0800, Ryan Knopp wrote:

> So I updated my code and malloc everything so I can free it. But it's
> still failing at that same point. I commented some of the code below.
>
>


> char *mesg = malloc(1024 * sizeof(char)); if(mesg == NULL)
> exit(0);


char *mesg = malloc(1024); ...


cliaddr = sizeof cliaddr;
> n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr,
> &len); if(n > 0)
> {
> mesg[n] = '\0';


This may do unwanted things if n==1024;



> struct tibo *tmp = malloc(sizeof(struct tibo));


most people prefer
struct tibo *tmp = malloc(sizeof *tmp);


[snipped rest]

HTH,
AvK

moi

2007-11-18, 7:45 am

On Sat, 17 Nov 2007 18:04:58 -0800, Ryan Knopp wrote:


> struct tibo *parsepacket(char *packet) {
> struct tibo *tmp = malloc(sizeof(struct tibo)); char **parsed;
> char **tmp2;
>
> if(tmp == 0)
> exit(0)
>
> parsed = nl_to_str(packet);
> tmp2 = parsed;
>
> /* commented this out to figure out why tmp2 won't free.
> while(*parsed != NULL)
> {
> if(strncmp("machine", *parsed, 7) == 0) {
> tmp->machine = &parsed[0][8];
> parsed[0][7] = '\0';
> }
> else if(strncmp("identity", *parsed, 8) == 0) {
> tmp->identity = &parsed[0][9];
> parsed[0][8] = '\0';
> }
> else if(strncmp("services", *parsed, 8) == 0)
> printf("blah\n");
>
> parsed++;
> }*/
>
>
> free(tmp2);
> /* this still errors out (glibc point error message now), even though I
> can't figure out why. I malloc all my variables now including packet.
> Since everything is malloc shouldn't i be able to free it? All i get
> is the glibc pointer error messages. All memory seems to be allocated.
>
> In theory when this function finishes I want everything freed and return
> tmp which is a struct tibo, which I added to the code
>
>
> */
>
> return tmp;
> }


IMHO, your variable names are rather unusual.
Personally, I would consider this rewrite a lot more readable::


struct tibo *parsepacket(char *packet)
{
struct tibo *result = malloc(sizeof *result);
char **array;
char **hnd;
char *cp;

array = nl_to_str(packet); if (!array) return NULL;

for (hnd = array; cp = *hnd; hnd++) {

if(!strncmp("machine", cp, 7)) {
tmp->machine = cp+8;
cp[7] = '\0';
}
else if(!strncmp("identity", cp, 8)) {
tmp->identity = cp+9;
cp[8] = '\0';
}
else if(!strncmp("services", cp, 8)) {
printf("blah\n");
}


}


free(array);

return result;
}

NOTE: You don't check for empty fields. If the input contains a line
with "machine\n........." in it, your NL-parser will replace this by
"machine\0.........", and your cp+8, above will point at the ... on the
next line, (or even beyond the packet). This is probably not what you
want.

NB. Are you sure your packet is '\0' terminated ?

HTH,
AvK
Ryan Knopp

2007-11-19, 1:41 am


> NOTE: You don't check for empty fields. If the input contains a line
> with "machine\n........." in it, your NL-parser will replace this by
> "machine\0.........", and your cp+8, above will point at the ... on the
> next line, (or even beyond the packet). This is probably not what you
> want.
>

This is ok. I'm just looking for certain keywords at the beginning of
each line. The specs say that there shouldn't be any spaces at the
beginning of each line.

> NB. Are you sure your packet is '\0' terminated ?
>

Yes it's '\0' terminated. I do this in main. You mention the fact "what
if the packet was 1024" then i would be overwriting characters. These
packets should never be that big but as I develop this program out I
will add that check, just right now I want try to figure out this memory
free problem that I'm having.

n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
if(n > 0)
{
mesg[n] = '\0';


I updated my code to include your example which makes more sense then
what I written. I now get a "*** glibc detected *** ./a.out: free():
invalid next size (fast): 0x0804b830 ***" Which means that I probably
have some sort of "out of bounds" or "not declared" memory error.

char **nl_to_str(char *packet)
{
int i, count = 0, j = 0;
char **str;

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
count++;

str = malloc(count+1 * sizeof(char *));
if(str == NULL)
exit(0);

str[0] = &packet[0];

for(i = 0; packet[i] != '\0'; i++)
if(packet[i] == '\n')
{
packet[i] = '\0';
if(packet[i+1] != '\0') /* this wasn't here before so it could
write in an out of bounds but this seemed not to solve it */
str[++j] = &packet[i+1];
} else
packet[i] = tolower(packet[i]);

str[j] = NULL;

return str;
}

Thanks again for your help.
Ben Bacarisse

2007-11-19, 1:41 am

Ryan Knopp <ryan--removethis--@theknopps.com> writes:

[Some attributions have been lost -- not by me!]
> Yes it's '\0' terminated. I do this in main. You mention the fact
> "what if the packet was 1024" then i would be overwriting characters.
> These packets should never be that big but as I develop this program
> out I will add that check, just right now I want try to figure out
> this memory free problem that I'm having.


Don't dismiss it so quickly.

> n = recvfrom(lnd, mesg, 1024, 0, (struct sockaddr *)&cliaddr, &len);
> if(n > 0)
> {
> mesg[n] = '\0';


in ode now snipped, mesg has size 1024 and if n == 1024 this
assignment writes out of bounds and all bits are off. However...

> I updated my code to include your example which makes more sense then
> what I written. I now get a "*** glibc detected *** ./a.out: free():
> invalid next size (fast): 0x0804b830 ***" Which means that I probably
> have some sort of "out of bounds" or "not declared" memory error.
>
> char **nl_to_str(char *packet)
> {
> int i, count = 0, j = 0;
> char **str;
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> count++;
>
> str = malloc(count+1 * sizeof(char *));


you mean

str = malloc((count+1) * sizeof(char *));

> if(str == NULL)
> exit(0);
>
> str[0] = &packet[0];
>
> for(i = 0; packet[i] != '\0'; i++)
> if(packet[i] == '\n')
> {
> packet[i] = '\0';
> if(packet[i+1] != '\0') /* this wasn't here before so it could
> write in an out of bounds but this seemed not to solve it */
> str[++j] = &packet[i+1];
> } else
> packet[i] = tolower(packet[i]);
>
> str[j] = NULL;


This looks odd. You have just written to str[++j] so I think you now
lose the pointer you wrote but there may be some dark reason for doing
that.

--
Ben.
Ryan Knopp

2007-11-19, 1:41 am

>> str = malloc(count+1 * sizeof(char *));
>
> you mean
>
> str = malloc((count+1) * sizeof(char *));


OMG That was it! I spent all weekend beating my head against the wall
and it was just parenthesis. UG. It wasn't a complete waste because
you guys showed me some problems I had with my code that I didn't
realize and pointed me to better solutions.

Thanks for all your help!
Ryan
Spoon

2007-11-20, 1:26 pm

Ben Bacarisse wrote:

> if n == 1024 this assignment writes out of bounds and
> all bits are off.


All bits are off?

Is that like calling memset(&var, 0, sizeof var);

;-)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com