| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | free()/sys3175 |
-=> Quoting Daniel Lynes to Phil Crown <=-
DL> .
DL> .
DL> // Track_Buffer[i] = *(ptr + i);
DL> Track_Buffer[head] = '\0';
DL> The above may be your problem. (That and the strncpy()
DL> function)...what's probably going on here, is that you're not keeping
DL> the original pointer. You're writing over the pointer for Track_Buffer,
DL> with that of ptr, so the free function is no longer looking at an
DL> allocate buffer. It's trying to free a null pointer. DOS _should_
DL> actually exit with an error of 'null pointer'.
DL> ... After they make styrofoam, what do they ship it in?
The code you quoted was something I tried and had commented out because of
the point you mentioned about incrementing the pointer.
strncpy() I didn't think would increment the pointer or does it? I have
noticed that if the code is compiled under EMX 0.9a it does not cause a
sys3175.
////
(o o)
----oOO--(_)--OOo---- phil.crown{at}bluecafe.com | Fido 1:124/6108.2
--- Blue Wave/Max v2.20
* Origin: * MacSavvy * Dallas * Mac * OS/2 * (214)250-4479 * (1:124/1208)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 124/1208 1 396/1 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.