mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-18 15:15:28 +01:00
[Dec 29 2007] - Rumble
Fixed top_of_helpt bug being off by one. (thanks Jamdog) Fixed trigedit copy bug where it used real_room and not real_trigger. (thanks Jamdog) [Dec 21 2007] - Rumble Fixed dg_affect crash caused by a typo on my part. Renamed shit again! No really in zmalloc.c unsigned char * shit. [Dec 15 2007] - Rumble Showvnums shows [T#] for a single attached trig or [TRIGS] for multiple attached trigs (except for rooms since there is plenty of room to list all attached trigs). Fixed bug where showvnums would not show if attached. (thanks Sryth)
This commit is contained in:
parent
b93379190f
commit
9336b21d40
12 changed files with 12293 additions and 12258 deletions
|
|
@ -358,41 +358,41 @@ void pad_check(meminfo *m)
|
|||
|
||||
int main()
|
||||
{
|
||||
unsigned char * shit;
|
||||
unsigned char * tmp;
|
||||
|
||||
zmalloc_init();
|
||||
|
||||
/* You should see no error here. */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
free(shit);
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
free(tmp);
|
||||
|
||||
/* Multiple frees test */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
strcpy(shit, "This should show up in the dump but truncated to MAX_ZDUMP_SIZE chars");
|
||||
free(shit);
|
||||
free(shit);
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
strcpy(tmp, "This should show up in the dump but truncated to MAX_ZDUMP_SIZE chars");
|
||||
free(tmp);
|
||||
free(tmp);
|
||||
|
||||
/* Free unallocated mem test */
|
||||
shit += 4;
|
||||
free(shit);
|
||||
tmp += 4;
|
||||
free(tmp);
|
||||
|
||||
/* Unfreed mem test... You should see "UNfreed mem at line 370" (at end) because of this */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
strcpy(shit, "This is unfreed memory!");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
strcpy(tmp, "This is unfreed memory!");
|
||||
|
||||
/* Buffer overrun test... You should see an ERR:endPad here */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
shit[202] = 0xbb;
|
||||
free(shit);
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[202] = 0xbb;
|
||||
free(tmp);
|
||||
|
||||
/* Buffer underrun test... You should see an ERR:beginPad here */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
shit[-3] = 0x0f;
|
||||
free(shit);
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[-3] = 0x0f;
|
||||
free(tmp);
|
||||
|
||||
/* Free NULL pointer test... */
|
||||
shit = NULL;
|
||||
free(shit);
|
||||
tmp = NULL;
|
||||
free(tmp);
|
||||
|
||||
printf("Test completed. See zmalloc.log for the messages.\n");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue