bt_overflow.c (14273) | bt_overflow.c (39327) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Olson. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 85 unchanged lines hidden (view full) --- 94 *ssz = sz; 95 96#ifdef DEBUG 97 if (pg == P_INVALID || sz == 0) 98 abort(); 99#endif 100 /* Make the buffer bigger as necessary. */ 101 if (*bufsz < sz) { | 1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Olson. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 85 unchanged lines hidden (view full) --- 94 *ssz = sz; 95 96#ifdef DEBUG 97 if (pg == P_INVALID || sz == 0) 98 abort(); 99#endif 100 /* Make the buffer bigger as necessary. */ 101 if (*bufsz < sz) { |
102 *buf = (char *)(*buf == NULL ? malloc(sz) : realloc(*buf, sz)); | 102 *buf = (char *)(*buf == NULL ? malloc(sz) : reallocf(*buf, sz)); |
103 if (*buf == NULL) 104 return (RET_ERROR); 105 *bufsz = sz; 106 } 107 108 /* 109 * Step through the linked list of pages, copying the data on each one 110 * into the buffer. Never copy more than the data's length. --- 118 unchanged lines hidden --- | 103 if (*buf == NULL) 104 return (RET_ERROR); 105 *bufsz = sz; 106 } 107 108 /* 109 * Step through the linked list of pages, copying the data on each one 110 * into the buffer. Never copy more than the data's length. --- 118 unchanged lines hidden --- |